4 ms·
This might be our best hope right now: https://github.com/tc39/proposal-pattern-matching https://github.com/tc39/proposal-pattern-matching
by alexsasharegan 8y ago
This might be our best hope right now: https://github.com/tc39/proposal-pattern-matching https://github.com/tc39/proposal-pattern-matching
- Klathmon 8y agoI see a lot of people asking for this in TS, but i'd much rather it be in plain JS and let TS add anything on top of it that is needed. Pattern matching would work SO WELL in javascript, especially considering how frequently switch is currently poorly used as a replacement in things like Redux.
- moogly 8y agoYeah, but there's no way that can be the final syntax, because it's absolutely horrible (TS could always have a Rust/C# 8 one on top though).