classes and enumerability
andrea.giammarchi at gmail.com
Fri Jan 30 05:43:07 PST 2015
if you are not pushing back the decision about **non** enumerable methods
in ES6 classes then I think we are good.
About everything else I think it's very risky to change old enumerable
defaults in IDL because libraries are used to check stuff in `Object.keys`
even to polyfill, instead of going with `Object.getOwnPropertyNames` so
while I believe I won't personally ever be hurt by a change in 'length' or
any other enumerable properties in WebIDL once made non enumerable, I am
pretty sure that's a very high-risk breaking change for the Web.
The reason classes could have been fixed in ES6 is that these have never
even landed officially in JS, WebIDL did already, and as ES3 prototypal
like inheritance work in ES6 regardless, anything that requires
enumerability can simply use that inheritance style.
New things could use new class ... I think nobody would be surprised, but
that's just my opinion.
On Fri, Jan 30, 2015 at 2:24 PM, Boris Zbarsky <bzbarsky at mit.edu> wrote:
> On 1/30/15 7:56 AM, Andrea Giammarchi wrote:
>> this will change too ?
> Changing that is what we're talking about, yes.
> WebIDL is full of inconsistencies compared with JS world and that,
>> talking about backward compatibility, shouldn't change.
> The question is whether backwards compat outweighs platform consistency
> here. For example, does anyone actually depend on "length" being
> enumerable on a nodelist? I've seen plenty of people working around it,
> but no one so far depending on it.
> That is just fine as everything enumerable, that is just fine as
>> Interface definition.
> Trying to align classes and IDL interfaces is a policy decision that was
> made a while back, fwiw....
> Why should IDL make classes bad for everything in JS land
> I have no idea what imagined strawman you're replying to here, but it
> would be good to spell out what your (incorrect, I think) assumptions are
> if you're going to reply to those assumptions, not to facts.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss