W3C home > Mailing lists > Public > public-script-coord@w3.org > April to June 2014

Re: Making properties of a class unenumerable

From: Allen Wirfs-Brock <allen@wirfs-brock.com>
Date: Thu, 29 May 2014 10:06:00 +0200
Cc: Anne van Kesteren <annevk@annevk.nl>, public-script-coord <public-script-coord@w3.org>, Andrea Marchesini <baku@mozilla.com>, Ian Hickson <ian@hixie.ch>
Message-Id: <7B857F7A-593D-410C-951E-650EDDBBA8B4@wirfs-brock.com>
To: Boris Zbarsky <bzbarsky@mit.edu>

On May 28, 2014, at 6:41 PM, Boris Zbarsky <bzbarsky@mit.edu> wrote:

> On 5/28/14, 10:05 AM, Anne van Kesteren wrote:
>> In order to get the same enumeration as before, we'd need to mark all
>> members of the object as [[Enumerable]] false.
> Specifically, we'd need to mark the methods on Storage.prototype as not enumerable.
> This is how built-in methods generally behave in ES.  This is not how class-defined methods behave in ES6, as far as I can tell.

Yes, this was a conscious design decision by TC39.  See https://github.com/rwaldron/tc39-notes/blob/master/es6/2012-09/sept-18.md#concise-method-definition-revisited 
and a change from what was original proposed.  TC39 consensus was driven by the belief that JS developers expect everything they define to be enumerable. 


Received on Thursday, 29 May 2014 08:06:36 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:14:21 UTC