3 ms·
Yes, functional programming does give you more options, and that's the point. Each style of programming -- functional, object-oriented, relational, imperative,
by rads 14y ago
Yes, functional programming does give you more options, and that's the point. Each style of programming -- functional, object-oriented, relational, imperative, etc. -- has its strengths and weaknesses. It's up to the programmer to choose which one best fits the problem at hand.
In some languages, like Java, you're stuck in the OO style of programming because its syntax and features make anything else too cumbersome. Clojure actually works the other way around: though the most common style is functional, it's easy to work in terms of objects. It might not look the same as Java OO, but that's for the better.
Here's a good book about switching between programming styles within a single program: http://www.amazon.com/Concepts-Techniques-Models-Computer-Programming/dp/0262220695 http://www.amazon.com/Concepts-Techniques-Models-Computer-Pr...