Allen Wirfs-Brock wrote:
From a usability case we have to consider which is more likely something like
the above or something like:
switch (x) {
case 0:
let a = ...;
// lots of lines of code using a
break;
case 1:
let b = ...;
// lots of lines of code using b
break;
case 2:
...
}
My guess was that the disjoint case would be more common and more annoying if
it was disallowed.
Exactly!
Did anyone read the Mozilla JS at those DXR links I gave? :-P
I considered spec'ing each case alternative as a block but I concluded it
would be unwise to introduce a block scope that was not associated with { }'s.
No can do with fall-through.
/be
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss