Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Anything consisting primarily of a switch statement with a great many cases.


Finite state machines then. I never used more than 3 cases unless I had to write one.


Also event dispatchers. I've written switch statements for various event systems that need to handle 60-100 events. You can easily get to hundreds of lines without things getting unreadable.




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

Search: