classes and enumerability

Andrea Giammarchi andrea.giammarchi at gmail.com
Tue Dec 23 16:35:36 PST 2014


Dear Santa,
  I wish since ES3 era that properties defined on a prototype are by
default **not** enumerable.

By any chance we can make this happen in ES6 classes?

Or better ... why would anyone expect or want them to be enumerable?

To define a `class` is a very explicit intent, I believe having those
definitions non enumerable would be a preferred option for majority of
developers that have been doomed in `for/in` since kinda ever before
enumerable was not configurable.

All default methods and properties in native prototypes are **not**
enumerable, why does it have to be so inconsistent with userland?

You also know ES6 is the only window we have 'cause after that it will be a
breaking change.

Thank you at least for any sort of extra/concrete clarification about this
choice.

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


More information about the es-discuss mailing list