4 ms·
While I do agree with you that trying to shoehorn ruby into a pure functional style is a bad idea, I believe it's generally a good thing to try to write functio
by rlander 15y ago
While I do agree with you that trying to shoehorn ruby into a pure functional style is a bad idea, I believe it's generally a good thing to try to write functional-style ruby: Functional in the small and OO in the large [1].
For example, you can have referential transparency in your methods, which will allow for easier debugging. You can also strive for simpler data structures and even freeze objects to make them immutable[2].
[1] http://www.johndcook.com/blog/2009/03/23/functional-in-the-small-oo-in-the-large/ http://www.johndcook.com/blog/2009/03/23/functional-in-the-s...
[2] http://ontwik.com/ruby/better-ruby-through-functional-programming-by-dean-wampler/ http://ontwik.com/ruby/better-ruby-through-functional-progra...