[Zope3-dev] Re: Better access to APIs in paths
Jim Fulton
jim@zope.com
Mon, 24 Feb 2003 15:24:19 -0500
Shane Hathaway wrote:
> Jim Fulton wrote:
>
>> Shane Hathaway wrote:
>> >
>>
>> ...
>>
>>> Namespaces appeal to me in this context because you already have to
>>> be aware of namespaces in order to write page templates (and, in the
>>> not-too-distant future, XHTML).
>>
>>
>>
>> People never write namespaces in zpt, because they hate to.
>> Early on, we required namespace declarations and people hated them.
>>
>> > So this proposal would let new users
>>
>>> move forward without learning many new concepts.
>>
>>
>>
>> Most zpt users don't know what xml namespaces are.
>
>
> Right, and that's why some implicit namespaces (like "dc" and "zope")
> might be useful. However, we're both aware of the problems that
> implicit namespaces can cause, so that's a concern.
These aren't implicit. They are predefined. We already have two other
predefined namespaces in zpt:
- The namespace of expression types
- The namespace of top-level objects.
> But I would suggest that people's dislike for the TAL and METAL
> namespaces may not apply here. "tal:" and "metal:" are like Python
> builtin names, in that they should always be recognized, whereas this
> new feature is more like a Python import statement, in that the
> namespace declaration gives the template access to some special feature
> of the system that might not always be available.
I think all of the api namespas should be like builtin names, but
I don't think that there should be many of them.
I think the api namespace namespace hierarchy should be shallow and wide.
Jim
--
Jim Fulton mailto:jim@zope.com Python Powered!
CTO (888) 344-4332 http://www.python.org
Zope Corporation http://www.zope.com http://www.zope.org