Re:“Coding is basically just ifs and for loops.”
by marginalia_nu on Saturday December 04, 2021 @05:00PM
(#29444681)
I've always felt like explicit state machines are the sledge hammer you break out when you can't find any good abstraction to encapsulate the logic. As an intermediate step for parsers it's pretty powerful, but it's not something I want in my hand written code if I have any alternatives.
For problems where those are the right tools, sure. But they aren't the right tools for all problems any more than ifs and for loops are.