06:42
<Aapo Alasuutari>
Random question: Are there any instances of Array exotic objects outside of the ECMAScript spec itself? There are lots of array-like objects in HTML spec but is there any object that's defined to use the DefineOwnProperty from 10.4.2.1 and otherwise use normal internal methods from 10.1?
06:59
<nicolo-ribaudo>
Anything in web specs that returns a sequence<...> is returning an array, for example navigation.entries(): https://html.spec.whatwg.org/#navigation-interface. It's defined at https://webidl.spec.whatwg.org/#js-sequence
07:28
<Aapo Alasuutari>
That seems to be just The Array exotic object, not some other object that would pass the test of "uses DefineOwnProperty from 10.4.2.1 and otherwise normal object internal methods". I'm looking for cases where an external spec defines a custom exotic object type that behaves exactly like the Array exotic object but with some additions over the top, e.g.. an added internal slot that is used as a marker.
07:30
<bakkot>

That seems to be just The Array exotic object, not some other object that would pass the test of "uses DefineOwnProperty from 10.4.2.1 and otherwise normal object internal methods".

those are defined to be the same thing

07:31
<bakkot>
if it uses DefineOwnProperty from 10.4.2.1 and otherwise normal object internal methods, then it is, by definition, an array exotic object; that is what it means to be an array exotic object
07:31
<Aapo Alasuutari>
Or in other words, I'm wondering if an engine should provide embedders a way to say "this object returns true from Array.isArray": It's unwieldy to test all internal method function pointers after all.
07:33
<bakkot>
generally speaking engines provide embedders a way to say "create an Array", which is sufficient; engines do not generally literally implement the [[DefineOwnProperty]] (etc) methods as actual functions to be tested
08:07
<Aapo Alasuutari>
I guess another way to phrase the same question is: Does the HTML spec define any Arrays that couldn't be created from within the ECMAScript language itself? And I think the only thing that can answer "yes" to this is added internal slots. Changing internal methods can't be done from the language itself but it would also make the object no longer an Array exotic object so it's not relevant in this case. Internal slots cannot be added or removed from within the language and do not change the Array exotic object -ness of the object so that would be a possible case.
13:29
<nullvoxpopuli>
Matrix is super niche, fwiw