Re: [heycam/webidl] Figure-out what supporting Array-subclassing implies (#345)

A great list. I agree with all. Some extra thoughts:

For (1), to expand on my "boiling the ocean" comment: new syntax makes me think `class X extends Array`. But then I'm all like, "maybe we should switch everything to `class ... extends ...` eventually." And then I start thinking, "isn't it weird to mix 'old' syntax like `readonly attribute` with a JavaScript-aligned syntax like `class`? So I dunno what the right path is here. Maybe it's best to forget about the larger aligning-with-JavaScript project in this context.

(3) sounds like a pretty disruptive change for implementations and spec-writing, but cool if we could get away with it.

(4) sounds like an OK "for now" limitation, but we'd need to check with our consumers...

(6) is quite interesting. I guess length + indices would be most consistent with existing array methods. https://tc39.github.io/ecma262/#sec-createlistfromarraylike is convenient but non-idiomatic in most cases; it would be useful if you need to snapshot some state before going "in parallel" though. In most cases you should probably perform work as you iterate, which definitely would benefit from a helper.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/heycam/webidl/issues/345#issuecomment-294914770

Received on Tuesday, 18 April 2017 17:14:59 UTC