Re: Why packages and namespaces?

2008-01-27 Thread liorean
I think Brendan had a nice explanation of that some time back:

On 10/08/2007, Brendan Eich <[EMAIL PROTECTED]> wrote:
> There's more work to do, including rationalizing and minimizing
> concepts including units and packages. A couple of notes:
>
> A package is a named pair of namespaces (public and internal), some
> rules for using those namespaces within the package body, and some
> special forms for importing names from the package's public namespace.
>
> Program units are compilation units, so unlike packages, which are
> never "closed" and can be extended in a given trust domain, units
> come to an end at the right curly brace.
>
> /be
-- 
David "liorean" Andersson
___
Es4-discuss mailing list
Es4-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es4-discuss


Why packages and namespaces?

2008-01-27 Thread Peter Michaux
What it the reason for ES4 having both packages and namespaces? It
seems like both can be used to protect the global namespace from
clutter and otherwise avoid identifier clashes. When to use one and
when to use the other?

Thank you,
Peter
___
Es4-discuss mailing list
Es4-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es4-discuss