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

I think switch blocks are only worth it when you have 2 or more `else if`, otherwise a normal `if` is more readable IMHO.



Normally I'd agree, but I really like the concise but readable way this handles the casting for you.


It might be if they used the One True Brace style ;)




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

Search: