3 ms·
I'm extremely excited about "case". It's the one thing I missed the most from Haskell & Scala.
by bitsai 16y ago
I'm extremely excited about "case". It's the one thing I missed the most from Haskell & Scala.
- praptak 16y agoC'mon, (condp = ...) was not that bad :)
- jcromartie 16y agocondp was rough for me. It requires too much shifting around of the pieces to figure out what it was doing.
- praptak 16y agoI don't believe there is very much gain in code clarity here. The core benefit of case over condp is efficiency. The condp is linear (goes over each clause until one matches) and case builds a very efficient dispatch function during compile time. This is why case only takes compile-time constant expressions.