01:28
<Michael Ficarra>
when we say "for each X of Y", it means sequentially in list order, right?
01:28
<Michael Ficarra>
do we say that anywhere?
01:29
<bakkot>
we do say that in most places I think
01:29
<bakkot>
I guess we only do that for the integer ranges
01:29
<bakkot>
not for lists as often
01:30
<Michael Ficarra>
what I'm asking is: do we say anywhere that when we say "for each X of Y", it means more specifically "sequentially in list order", or is one supposed to just know that?
01:30
<Michael Ficarra>
because I don't think it's obvious, but there's also places that depend on that meaning
01:32
<Michael Ficarra>
RegExp.escape also depends on that meaning
01:32
<bakkot>
I feel like we talked about doing that but I can't find it
01:32
<Michael Ficarra>
maybe we have an issue?
01:33
<Michael Ficarra>
if I had the choice, I would probably prefer explicitly saying "sequentially, in list order" wherever we depend on that over just defining every for-each to have that meaning
01:34
<Michael Ficarra>
that way we can distinguish cases where it matters from those where it doesn't
01:34
<bakkot>
aha
01:34
<bakkot>
https://tc39.es/ecma262/multipage/ecmascript-data-types-and-values.html#sec-list-and-record-specification-type
01:34
<bakkot>
When an algorithm iterates over the elements of a List without specifying an order, the order used is the order of the elements in the List.
01:34
<Michael Ficarra>
❤️ thank you
01:35
<bakkot>
https://github.com/tc39/ecma262/pull/2152
01:38
<Michael Ficarra>
okay well some day it might be nice to differentiate those that depend on order from those that don't, but the prose in 6.2.2 is good enough for me for now
02:08
<jmdyck>
In https://github.com/tc39/ecma262/pull/2152#issuecomment-679174888, I wondered if the spec was already doing that differentiation. But I suspect it wasn't.
03:18
<Michael Ficarra>
yeah @jmdyck I suspect the places where we used to explicitly state "in list order" were no different than other places, just authored by different people at different times