classes and enumerability

Glen Huang curvedmark at gmail.com
Tue Dec 23 21:33:24 PST 2014


Although I guess it’s not very easy to desugar to es5 if there is no way to enumerate prototype methods/properties. (probably impossible?)

> On Dec 24, 2014, at 1:17 PM, Glen Huang <curvedmark at gmail.com> wrote:
> 
> Actually mixins shouldn’t be done with Object.assign if that’s what you mean.
> 
> I think the language should provide a syntax for that (e.g., Lightweight traits on http://www.nczonline.net/blog/2014/06/03/my-ecmascript-7-wishlist/ <http://www.nczonline.net/blog/2014/06/03/my-ecmascript-7-wishlist/>)
> 
>> On Dec 24, 2014, at 1:09 PM, Russell Leggett <russell.leggett at gmail.com <mailto:russell.leggett at gmail.com>> wrote:
>> 
>> 
>> 
>> On Wednesday, December 24, 2014, Kevin Smith <zenparsing at gmail.com <mailto:zenparsing at gmail.com>> wrote:
>> The question is: what should ES6 classes choose as the default? What's the most useful default, independent of various backward-looking consistencies? What, if the future is bigger than the past, would be best?
>> 
>> Framed that way, then non-enumerability.
>> 
>> If we want to preserve any kind of conceptual integrity for enumerability, then enumerability must indicate that the property is a data element within a data structure.
>> 
>> Whether enumerability is worth preserving, I don't know.
>> 
>> I'll just throw out mixins as a possible reason to keep enumerability.
>> 
>> - Russ 
>> _______________________________________________
>> es-discuss mailing list
>> es-discuss at mozilla.org <mailto:es-discuss at mozilla.org>
>> https://mail.mozilla.org/listinfo/es-discuss
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20141224/eb204b47/attachment.html>


More information about the es-discuss mailing list