One of my least favorite parts of nearly every programming language I’ve spent much time with has been the ubiquitous
switch statement. Though it does serve a useful purpose in some compiled languages, I think switch is a clunky eyesore in most code. Its structure is prone to taking root and only growing larger and more cumbersome over time.
switch statement to use this alternate technique, and improve its extensibility and maintainability in the process.
Click here to read the rest of this post »