Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
agent327
on Sept 15, 2023
|
parent
|
context
|
favorite
| on:
Linear code is more readable
Anything consisting primarily of a switch statement with a great many cases.
orwin
on Sept 15, 2023
[–]
Finite state machines then. I never used more than 3 cases unless I had to write one.
agent327
on Sept 19, 2023
|
parent
[–]
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: