Skip to content

Comment on Ask HN: How do you write code so it's easy to change?parent

Comments

In theory yes, in practice I'm not so sure: I've seen state machine implementations which were ten times more code than the few if/else/for loop needed.

Sure you can draw a pretty state machine diagram, but is the code really easier to read and maintain? I'm not sure.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.