| 01:33 | <shu> | bakkot: what is "1. If NewTarget is undefined or the active function object, throw a TypeError exception." intended to do in the Iterator constructor? throw on creating empty iterators? |
| 01:35 | <bakkot> | uhh that spec text predates my involvement. I guess it is intended to make Iterator essentially an abstract class? |
| 01:35 | <bakkot> | i.e. you can't instantiate it directly, only inherit from it |
| 01:35 | <shu> | okay |
| 01:35 | <bakkot> | (that's the "active function object" bit; the "undefined" is what makes it not invokable without new) |
| 01:36 | <shu> | that's... fine i guess? |
| 01:36 | <shu> | yes, i meant the active function object bit |
| 01:36 | <bakkot> | tbh I didn't notice that was there |
| 01:36 | <shu> | that's a behavior i've never implemented before |
| 01:36 | <shu> | so wanted to double check |
| 01:36 | <bakkot> | cc snek |
| 01:36 | <shu> | like i guess it'd be pretty useless to call new Iterator(), so it's fine to error |
| 01:37 | <bakkot> | I could imagine doing something like let x = new Iterator(); x.next = () => ({ done: false, value: 0 }), I guess |
| 01:37 | <bakkot> | but let x = { __proto__: Iterator.prototype, next: () => ({ done: false, value: 0 }) } works just as well if you want that |
| 01:38 | <bakkot> | some people are averse to the __proto__ syntax but like whatever |
| 01:38 | <bakkot> | it does seem like a kind of unnecessary restriction |
| 01:39 | <bakkot> | otoh it genuinely is abstract in that you need to provide your own next |
| 02:27 | <rbuckton> | uhh that spec text predates my involvement. I guess it is intended to make abstract class). Hopefully having the concept of an abstract class as built in might make it easier to get a proposal adopted |
| 03:01 | <snek> | like i guess it'd be pretty useless to call new Iterator(), so it's fine to error |
| 03:01 | <snek> | it is definitely not the norm |
| 08:59 | <Rob Palmer> | The new Safari 16.4 Beta looks excellent. The release notes says that it contains Array grouping. I guess general availability of that will be gated on resolving the API naming to ensure it is web compatible. https://developer.apple.com/documentation/safari-release-notes/safari-16_4-release-notes |
| 18:05 | <shu> | it does seem like a kind of unnecessary restriction |
| 18:57 | <shu> | wait why is Iterator.prototype non-configurable? |
| 18:58 | <shu> | we don't do that for other prototypes do we |
| 19:06 | <Ashley Claymore> | My phone says we do? |
| 19:07 | <bakkot> | yeah .prototypes are non-configurable by default |
| 19:09 | <Ashley Claymore> | but writable on function declarations and maybe some other functions? |
| 19:09 | <shu> | wait |
| 19:09 | <shu> | hol up |
| 19:10 | <shu> | you are correct |
| 19:11 | <shu> | i was confused by the iterator-adjacent prototypes, like https://tc39.es/ecma262/#sec-generatorfunction.prototype.prototype |
| 19:11 | <shu> | which are configurable |
| 19:11 | <shu> | i guess the question is then why are those configurable |