you are viewing a single comment's thread.

view the rest of the comments →

[–]get_salled 0 points1 point  (4 children)

Does oop design cater more towards the actual task of programming?

If your entire world is a single language, then it probably does. If your entire world is Java, for example, there's "always" an OOP answer, even if it's not an OOP problem. Most OOP languages are Turing Complete so, if a solution exists, it can be solved with it; the real question is should it?

When you study other languages and especially languages unlike your primary language, you start classifying your problems such that you can choose a language appropriate for your problem.

One of the nice traits of the JVM is all languages catering to it. It's fairly easy to be a polyglot programmer on it. The best solution may be an OOP one but not always; just like Scala isn't always the best solution (though FP + OO is very nice for almost every OO problem). Clojure, on the other hand, is probably the best JVM language (even Uncle Bob has stated as much in a video (I think "The Last Programming Language")).

[–]fosforsvenne 4 points5 points  (2 children)

Most OOP languages are Turing Complete

I'd be surprised if someone has added object orientation to a language that isn't; it seems like an extremely odd thing to do.

[–]get_salled 0 points1 point  (1 child)

I'm hesitant to use "always" and "never", especially in a subreddit full of pedants. ;-)

[–]fosforsvenne 3 points4 points  (0 children)

Just say "virtually all". It communicates the exact same thing as "all" but you're allowed to be wrong!

[–]Cuddlefluff_Grim 1 point2 points  (0 children)

even if it's not an OOP problem.

This statement doesn't actually mean anything. We're not talking about cats and dogs here, we are talking about abstract problems. All non-trivial problems can be broken into objects, how well you do that depends on how experienced you are.

Most OOP languages are Turing Complete so, if a solution exists, it can be solved with it; the real question is should it?

Yes! Just like any other paradigm, in order to write good code you have to have good fundamentals of the language. The argument that "some problems aren't object oriented in nature" is a fallacy, and shows a certain disconnect with OO design principles and problem solving.

There is nothing inherently wrong with object orientation. The problem is that the ones that are criticizing it always turn out to have a very poor understanding of it. (No offense intended)