Comment by skydhash

7 hours ago

The need for fuctions are usually abstraction or reusability. If you can extract part of the logic under a nice domain concept please do so. It’s better than comments. Not extracting the logic usually means a lot of intermediate variables to keep track for.

If you are passing your whole state around, that usually means, you’ve not designed your state well.