| ▲ | xorcist 2 hours ago | |
> They don’t fit on a single screen, so to understand them you end up scrolling up and down. Split them up into multiple functions and there is more scrolling, and now also jumping around because the functions could be anywhere. > It’s hard to follow the state, because more things happen It's easier to follow state, because state is encapsulated in one function, not constantly passed around to multiple. > a huge switch statement with inline code Huge switch statements are a common reason for large functions. Python has this architecture and largely won because the interpreter is surprisingly easy to understand and extend. | ||