On Sun, Jan 12, 2014 at 11:45 PM, Andrea Giammarchi < andrea.giammar...@gmail.com> wrote:
> Rick, what you wrote has _nothing_ to do with inheritance, right? So why > should "classes" methods be part of a for/in of an instance, which is not > what you wrote, again? > Sometimes I find you incredibly frustrating to communicate with. You asked me to give an example of "expected to be enumerable" and I did so by providing an example in the form that I made my original argument for revisiting the decision to make concise method definitions non-enumerable. Specifying concise method definitions to be enumerable: true in all cases is consistent with defining a method on a prototype object today: function C() {} C.prototype.method = function() {}; for (var p in C.prototype) {console.log(p)} > method Refactor #1: function C() {} C.prototype = { constructor: C, method() {} }; for (var p in C.prototype) {console.log(p)} > method Refactor #2: class C { method() {} } for (var p in C.prototype) {console.log(p)} > method Now that I've described as clearly as I possibly can, I hope the point of making concise method definitions—regardless of which syntactic body form they appear in—produce an enumerable: true property is clear to you and that my answer has sufficiently met your need. Rick
_______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss