4 ms·
Yes, having a way to prevent conditional dispatch on known-likely-to-change values would be good for cases like this. Adding such a language feature to JS spec
by bzbarsky 8y ago
Yes, having a way to prevent conditional dispatch on known-likely-to-change values would be good for cases like this. Adding such a language feature to JS specifically is pretty unlikely, of course. :)
Also, you may still want dispatch on "what sort of exception was this?" so then you have to provide an alternate mechanism for that...