On Wed, 22 Sep 2004 23:13:37 -0400, Dan Sugalski wrote:

> At 7:32 PM -0700 9/22/04, Jeff Clites wrote:
>>On Sep 22, 2004, at 10:58 AM, Dan Sugalski wrote:
>>
>>>*) There are three things that can be in a namespace: Another 
>>>namespace, a method or sub, and a variable.
>>>
>>>*) The names of namespaces, methods & subs, and variables do *not* 
>>>collide. You may have a namespace Foo, a sub Foo, and a variable 
>>>Foo at the same level of a namespace.
>>
>>The easiest way to say these two point may be just to say that each 
>>namespace has three sections, and a given lookup is always a lookup 
>>in a specific section.
>>
>>One problem: Some languages (Scheme, for example, and arguably C) 
>>have a unified namespace for subs and variables. What to do there?
> 
> The easiest thing would be to allow the languages to store into 
> multiple sections at once, or leave it to them to do the right thing 
> as they need to. Either way works OK for me, since neither Scheme nor 
> C are really our target languages.
> 

Ah, but python has a unified variable/function namespace.  Allow me to
demonstrate:

#!/usr/bin/env python
def a():
    pass
print a
a = 7
print a

Produces the following on my system:

<function a at 0x401e0b54>
7

So this does need to be addressed for a primary target language.

-- 
Jonathan

Reply via email to