Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> Yeah exactly, I think of this as "imperative in the small" and "functional in the large". There's no real cost to local state, but there's a big cost to tracking global state.

I think of it as having to deal with the fact that humans only have so much mental space/short term memory.

The problem with stateful everything is that you can't build a complete understanding of it; there's just too much. However, for short bits of code that don't leak their imperativeness to the outside world, it doesn't matter. You can read the whole function and understand it.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: