News for hackers. Stuff that matters.
Re:The death of if/else cascades, a lightweight alternative by agbell on Sunday December 06, 2009 @03:07PM (#980074)
A pattern matching solution is much more readable and it forces you to build small functions if you are pattern matching in the function declaration.
Re:The death of if/else cascades, a lightweight alternative by silentbicycle on Sunday December 06, 2009 @03:18PM (#980092)
Right, AND being able to match on multiple fields and destructure them means that several awkward "which class owns the method" problems never arise in the first place.

(Multimethods are similar in many ways, though I find pattern matching far more useful.)