Hacker News new | past | comments | ask | show | jobs | submit login

OOP is Java, and Java is OOP, right?

My point is to follow a dogmatic OOP approach (think all the nouns like Agent, Prompt, etc.) to model something rather sequential.




No, you can do OOP without having to use Java, but you cannot really do Java without at least some OOP concepts.

I'm guessing only Smalltalk rivals Java in OOP-ness, as in Smalltalk literally everything is an object, while in Java only most things are objects.


The OOP concept described by Smalltalk is message passing. The closest OOP-ness rivals are Ruby and Objective-C (and arguably Erlang). Java has no such facilities. Java is much more like C++.


Maybe. Developers love to invent new definitions for existing terms all the time, so Java is OOP under one or more of those definitions, but Java is not OOP in the original sense. So, it depends on the definition of OOP arbitrarily chosen today.


The "original sense" argument is frankly nonsense. Simula 67 was the original OOP language, predating Smalltalk, and it already had "classes" and "objects". It also looked a great deal like Java and the OOP parts of C++.


Simula 67 long predates OOP. Which, when you think about it, means that when OOP was coined it referred to a "message passing" paradigm, not "classes" or "objects". "Oriented", not "object", was the operative word. Having objects does not make a language object-oriented, at least not as it was originally conceived.

Simula 67, like Java, may fit into some newer OOP definitions that have come about over the years, but it was not considered OOP at the time of its arrival. The term OOP hadn't even been invented yet. And when OOP finally did get used for the first time, it most definitely did not refer to Simula 67. Where on earth did you get the idea that it did? Whatever gave you that idea was, frankly, nonsense.


"Object-oriented" ipso facto refers to programming using objects. Simula had objects, and they were objects in the same exact way as Smalltalk objects are objects - a bundle of state with identity and behavior. Whether the exact term "OOP" was used by Simula authors is immaterial. The usual claim is that what makes Smalltalk special is message passing as opposed to method calls, but they are obviously isomorphic.


Simula is basically C++ before C++, and we know C++ is not OOP in the original sense. When OOP was first defined, it was quite explicitly noted that C++ is not OOP. Java's object model follows in the same vein as this lineage. These are not OOP languages, as originally conceived.

Furthermore, message passing was the defining feature of OOP. Of course it was. That is the distinction OOP was calling attention to – what made OOP different from the other object-based languages that had been around for decades beforehand. Nobody was going to randomly come up with OOP out of the blue to describe a programming model from the long ago past. Method calling may be superficially similar, but OOP was coined to call attention to what difference there is.

You are, of course, quite free to come up with your own redefinition of OOP that includes Simula, C++, Java, whatever you wish. You would not be the first. However, as we are talking about the original definition, whatever you want to define it as does not apply. It is not your definition that is under discussion.


Not if Alan Kay has anything to say about it.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: