Every body writes something like this. Every body. Just because some devs don't write this in a single block of code, and scatter them across program logic doesn't make them any better.
I've had developers balk at other developer's code for writing a series of like 100 if-else's until I show them, they do it themselves only that they scatter it. You could say this thing about nearly every OO programmer out there.
Everybody writes code that mutates state in a way that produces the kind of code you mentioned as an example.
It's only that some developers think they can never write bad code, while thinking other's almost always do.
This is one reason why some shops hire only OCaml, or Haskell or Clojure devs because bad devs tend to use those languages less. So you buy into a great community by default.
I've had developers balk at other developer's code for writing a series of like 100 if-else's until I show them, they do it themselves only that they scatter it. You could say this thing about nearly every OO programmer out there.
Everybody writes code that mutates state in a way that produces the kind of code you mentioned as an example.
It's only that some developers think they can never write bad code, while thinking other's almost always do.
This is one reason why some shops hire only OCaml, or Haskell or Clojure devs because bad devs tend to use those languages less. So you buy into a great community by default.