>
>
> I'd like to understand. Why doesn't it work?
>
>
Allen wondered the same, so I'll just paste my reply to him:

So I was a little embarrassed about not thinking it through, and wanted to
just void the comment.

But specifically, if the subclass wants to have a different set of
constructor arguments than its base class, then presumably the subclass
would have to override @@create with that signature.

class MyMap extends Map {
    constructor(a, b, c) { super(); /* other initialization */ }
    static [Symbol.create](a, b, c) { return super(); }
}

Is that right?

That seems like too much of a burden for the user.  And besides, it
pollutes the nice separation of responsibilities that we currently have.

The current design does posit uninitialized objects, which implementers are
obviously uncomfortable with.  Could it be that we just haven't yet
developed the implementation techniques for dealing with such uninitialized
objects? Or is there a real problem with being able to observe them?
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to