05:35
<bakkot>
this is a very fun writeup of a CVE in chrome which happened as a consequence of a change to TypedArrays in the spec: https://tiszka.com/blog/CVE_2021_21225.html
05:36
<bakkot>
also serves as a good concrete example of Symbol.species causing bad things to happen
14:25
<shu>
yes, that was a "i'm in this picture and i don't like it" situation
15:12
<jschoi>
Looking at https://github.com/tc39/proposal-pattern-matching/issues/168#issuecomment-814216217, I’m wondering: Is it a goal to forever avoid the Bad Keywords (eval, with, switch) in new syntax? That is, is it a committee invariant that those three words not be used in any new syntax going forward?
15:42
<shu>
well, eval isn't a keyword
15:42
<shu>
and i've seen ideas float around that want to co-opt with for more useful purposes, it's a nice keyword
15:43
<shu>
so it's not an invariant from my perspective
16:04
<jschoi>
Yeah, I mean Bad Words in general, I guess, heh. An example for eval: https://github.com/tc39/proposal-do-expressions/issues/53#issuecomment-771789167
16:04
<jschoi>
I suppose I haven’t seen anything about this with with yet; I had assumed it was in a similar situation to switch etc. I don’t remember seeing any proposals actually using with.
16:23
<jschoi>

If with is going to be treated differently from switch (in that new syntax may use with but not switch), it might be good to make explicit how their situations are different. After all, they’re similarly discouraged (already discouraged for with and discouraged in the future for switch whenever match is standardized; see https://github.com/tc39/proposal-pattern-matching/issues/168#issuecomment-707404650).

I suppose that switch and match have somewhat similar purposes, while no future syntax is going to have a purpose at all similar to with’s current purpose (dynamic binding)…so there might be less risk of confusion between with’s current purpose and any future syntax that reuses with for a completely different purpose, compared to switch and match.

And so, if a future syntax somehow reused switch for a purpose completely different from pattern matching, then perhaps that too might be acceptable…though I cannot think of any such possible purpose for switch.

17:11
<ljharb>
jschoi: with has been discouraged for a long time, and can't be used in ESM or classes, so it's unlikely its use will cause confusion, especially since people will likely google match with and get to the right place. overlapping match and switch, however, will be quite confusing
17:11
<ljharb>
we could certainly use a different spelling than "with" if that's a concern tho
17:12
<ljharb>
iow, the goal is not "avoid bad keywords", it's "avoid switch, specifically, because it is the Bad Thing this exact proposal is trying to obviate"