On 20 May 2011 15:42, Mark S. Miller <erig...@google.com> 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. /Andreas > On May 20, 2011 7:58 AM, "Andreas Rossberg" <rossb...@google.com> wrote: >> On 19 May 2011 16:05, David Herman <dher...@mozilla.com> wrote: >>> Yes, we've talked about this. One of the issues I don't know how to >>> resolve is if we want to allow the specification of class properties aka >>> statics, then those need *not* to be in the scope of the constructor >>> arguments, which ends up with very strange scoping behavior: >>> >>> var x = "outer" >>> class C(x) { >>> static foo = x // "outer" -- whoa! >>> } >>> >>> I'm not 100% up on the current thinking of the group that's been working >>> on classes, and whether they are including statics in the design, but I >>> think they are. >> >> Oh, it wasn't clear to me that we really want to have static members. >> I may be biased here, but I always viewed static members as just a >> poor man's substitute for a proper module system. Fortunately, it >> looks like we will have a real one instead! >> >> To be honest, I'm a bit worried that there will be a _lot_ of semantic >> redundancy in the end. After adding modules + classes + static members >> (+ traits?), there would be at least three or four different, >> complicated constructs that evaluate to some kind of object, with >> significant functional overlap. >> >> Thanks, >> /Andreas > _______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss