Porting some code from OCaml to Scheme, the amount of boilerplate that goes away is staggering. Of course, I am also losing a whole lot of safety and refactoring help. But this sure makes the cost visible.
Any of the solutions above is a "I can't do it in my language because it's not expressive enough" answer. So much for types and modularity, when you fail to support the one most important kind of modularity in the entire universe of programming: STATE.
-
-
I think I'm not understanding how you define 'modularity'. If you were to say that state is a natural source of coupling between processes, I'd weakly agree with a caveat that different processes often need different parts of the state. But coupling is opposite of modularity.
-
State *decouples* processes or functions. Stateful variables are modular: independently declared. By contrast, the "pure" state monads passes around "the" state, a globally defined entity that must couple together each and every variable of every function, process or module.
- 4 more replies
New conversation -
-
-
Reader is rarely simpler than passing an argument.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
Read my blog!