On Mon, Sep 15, 2008 at 7:28 PM, David-Sarah Hopwood < [EMAIL PROTECTED]> wrote:
> > > Agreed that this proposal does not prevent this existing confusion. > Neither > > does it make it worse. If there's something we can plausibly do to fix > this, > > I'd love to! Any suggestions? > > The problem here is the lack of any run-time type distinction between > constructors and other functions. I don't see how to fix the existing > confusion in a compatible way. However, when we add the class feature in > ES-Harmony, we should avoid making it worse by using a desugaring that > allows the class name to be used with 'new', but prevents any use as a > function from breaking object encapsulation. > The desugaring I presented in "Look ma, no 'this'" does so, precisely because it avoids 'this'. -- Cheers, --MarkM
_______________________________________________ Es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

