Hacker News new | past | comments | ask | show | jobs | submit login




I'm extremely excited about "case". It's the one thing I missed the most from Haskell & Scala.


C'mon, (condp = ...) was not that bad :)


condp was rough for me. It requires too much shifting around of the pieces to figure out what it was doing.


I 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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: