|
|
|
|
|
by mgoetzke
2984 days ago
|
|
I would agree, BUT code needs to be readable first. The proposed syntax applied to e.g switch would have just braces which would not look very readable. Having less lines can make extremely unreadable code. Readable code with an error is easy to fix, unreadable code is not. At the very least the ambiguity of doing TWO things (matching AND destructuring) should not be allowed since it changes the outcome based on whether a value is a literal or a variable with the exact same literal assigned to it (at least that's how I understand it from reading the examples) |
|