On May 23, 2011, at 10:48 AM, Mark S. Miller wrote:
> Static members on classes are generative merely because classes are
> generative:
>
> function makeFoo() {
> return class Foo {
> static x = Math.random();
> //...
> }
> }
>
> Your reply to Dave makes use of generative module functions. Yes, if we have
> generative module functions then my objection disappears. Modules would then
> also be generative.
Not without the module-function head syntax, or we lose lexical scope with
static errors for typos, though. The last issue is huge, and it does not affect
only import M.*.
Possibly we have different undrestandings of module functions, but the base
module system is static and second class. This should be unchanged by any
extension, and extensions building on module system should not have "too
different" semantics (I'm a broken record on this; also I agree it bites
generators, wherefore the function*(){} minimal generator syntax idea. The
syntax difference need not be huge,but it should be distinctive).
/be
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss