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.
What do you do? Use globals? Explicitly pass extra parameters around to each and every function, thus contaminating your lexical scopes with any state any function anywhere might need (e.g. database connection and transaction state)? Live the ascetic life to do more with less?
-
-
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.
- 5 more replies
New conversation -
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!