On 23 May 2011 19:48, Mark S. Miller <[email protected]> wrote: > On Mon, May 23, 2011 at 7:22 AM, Andreas Rossberg <[email protected]> > wrote: >> On 20 May 2011 15:42, Mark S. Miller <[email protected]> wrote: >> > Modules aren't generative. >> >> If you mean that you cannot create several objects from them, then >> yes, but see my reply to Dave. >> >> However, I was primarily wondering about static members, which don't >> provide any generativity in that sense either. > > Static members on classes are generative merely because classes are > generative: > function makeFoo() { > return class Foo { > static x = Math.random(); > //... > } > }
OK, now I see what you mean. However, I'd say that is not really a difference between the semantics of modules vs static class members per se, but simply a consequence of classes being first-class, while modules are restricted to second-class status. That, in turn, is merely a (well-advised) design choice of the current proposals, but nothing inherent to either modules or classes. /Andreas _______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

