Is Java 100% object oriented? [closed]

When Java first appeared (versions 1.x) the JVM was really, really slow.
Not implementing primitives as first-class objects was a compromise they had taken for speed purposes, although I think in the long run it was a really bad decision.

“Object oriented” also means lots of things for lots of people.
You can have class-based OO (C++, Java, C#), or you can have prototype-based OO (Javascript, Lua).

100% object oriented doesn’t mean much, really. Ruby also has problems that you’ll encounter from time to time.

What bothers me about Java is that it doesn’t provide the means to abstract ideas efficiently, to extend the language where it has problems. And whenever this issue was raised (see Guy Steele’s “Growing a Language”) the “oh noes, but what about Joe Sixpack?” argument is given. Even if you design a language that prevents shooting yourself in the foot, there’s a difference between accidental complexity and real complexity (see No Silver Bullet) and mediocre developers will always find creative ways to shoot themselves.

For example Perl 5 is not object-oriented, but it is extensible enough that it allows Moose, an object system that allows very advanced techniques for dealing with the complexity of OO. And syntactic sugar is no problem.

Leave a Comment