I noted some open issues on "Classes with Trait Composition"

Mark S. Miller erights at google.com
Fri May 20 06:42:38 PDT 2011


Modules aren't generative.

sent from android
On May 20, 2011 7:58 AM, "Andreas Rossberg" <rossberg at google.com> wrote:
> On 19 May 2011 16:05, David Herman <dherman at 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20110520/bf73fbdf/attachment.html>


More information about the es-discuss mailing list