Domenic Denicola wrote:
On Mar 27, 2012, at 13:10, "David Herman"<dher...@mozilla.com>
wrote:

I recognize the C.prototype.constructor idiom already exists, but
it's a weak idiom. I'm not crazy about the idea of strengthening a
problematic but currently unreliable and rarely used idiom.

Dave

Speaking as a dev, I would like this idiom to be stronger (i.e. be
there by default in a classy world). One use case that immediately
springs to mind is try { } catch (e) { switch(e.constructor) { } },
which we've used a couple times in the absence of Mozilla-style
exception guards.

Your concern about possibly not wanting to expose the constructor
makes a lot of sense, but perhaps we could leave
.prototype.constructor configurable and let people in such a
situation explicitly delete it.

+1 (I wonder why they did not proposed this, they used it for the methods as well)
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to