Fwd: Addition of a global namespace function?

Ryan Gies ryan at livesite.net
Thu Dec 3 17:12:31 PST 2009


On 12/03/2009 06:31 PM, Mike Samuel wrote:
> 2009/12/3 Ryan Gies
>    
>> I appreciate this thread as it has made me aware of the CommonJS effort
>> which is of dear interest.  I will certainly continue there, however I
>> simply want to contribute the work I have done to find the ECMAScript way to
>> manage packages and classes.  For reference, and whatever value it may have,
>> this is a bare-bones implementation which matches what you propose:
>>
>> Documentation: http://support.livesite.net/products/es/docs/?doc=es1.doc
>> Source: http://support.livesite.net/products/es/es1.js
>>      
>  From my a quick look, it seems that you're also turning strings into
> package/namespace names at runtime.
> Are packages reified as javascript objects?  Is it also a hierarchical
> addressing scheme?
> Is this something that would be helped or hindered by the namespace function?
>    
Yes, packages are reified as objects and it is a hierarchical addressing 
scheme.

The proposed namespace function would be neither a benefit nor hindrance.

In my opinion, that which Mark has proposed as the 'namespace' function 
would be more aptly named 'vivify'--a very useful function indeed.  The 
keyword 'namespace' is extremely valuable and ought be reserved for 
introducing scope into the parser rather than a runtime function.


More information about the es-discuss mailing list