Great questions. The proposal has evolved a bit, so please forgive the moving-target nature of the page available now at
http://wiki.ecmascript.org/doku.php?id=proposals:program_units (BTW, this is the new and as far as I know world-readable location of the dokuwiki we've been using for proposals, discussion, and spec prototyping. It's almost read-only now, since the reference implementation, trac bug-ticket database, and real spec documents are more the collective source of truth.) 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 On Aug 10, 2007, at 2:29 AM, Shijun He wrote: > I've read the presentation "The truth about > JavaScript"<http://developer.mozilla.org/presentations/eich-ajax- > experience-2007/> > by Brendan, there are some code: > > use unit acme.widgets "http://acme.com/widgets"; > > unit acme.widget { > // program unit definition goes here > ... > } > > What is the "unit" for? What's the relation of "unit" and "package"? > _______________________________________________ > Es4-discuss mailing list > [email protected] > https://mail.mozilla.org/listinfo/es4-discuss _______________________________________________ Es4-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es4-discuss
