5 ms·
Sure, this is what I meant by natural. Just one thing: when you write that Ruby script, could one of the reasons why you don't use a FP style be not only that
by charlysl 9y ago
Sure, this is what I meant by natural.
Just one thing: when you write that Ruby script, could one of the reasons why you don't use a FP style be not only that maybe it wouldn't be natural to do so in Ruby, but also that it's unsuitable for the kind of problem you are trying to solve with that script to begin with?
I mention this, because I have the impression that people tend to believe that to solve a programming problem you should use whatever paradigm is perceived as the main one for the language at hand. However, I believe that it's the problem that should dictate the paradigm.
- fhood 9y agoI agree in principle, but rather than the problem dictating the paradigm, I would say it usually dictates the language. If a problem is well suited to a functional implementation then I'll probably break out Scala to solve it.
- charlysl 9y agoI agree, that would be the right to do. But the thing is, what if you are stuck with a given language, and/or its a biggish complex project where different aspects are better solved with different paradigms?