2 ms·
Just FYI, I asked a pretty similar question a few months ago here [1]. The main arguments for pattern matching seemed to be that: * [at least some] compilers w
by sundarurfriend 10y ago
Just FYI, I asked a pretty similar question a few months ago here [1]. The main arguments for pattern matching seemed to be that:
* [at least some] compilers will check for exhaustiveness
* "Pattern matching isn't just conditional matching. It's also binding, and even some common operations. "
[1] https://news.ycombinator.com/item?id=11159321 https://news.ycombinator.com/item?id=11159321