News for hackers. Stuff that matters.
Re:Object-oriented Programming with ANSI-C (1993) [pdf] by gpderetta on Thursday June 22, 2023 @06:24AM (#36430074)
Simula67, arguably the first OO language, was centered around inheritance.

The other early major OO language was obviously Smalltalk which focused on message passing.

Both C++ and Java were majorly influenced by Simula, while more dynamic languages take on aspects of Smalltalk.

Re:Object-oriented Programming with ANSI-C (1993) [pdf] by pjmlp on Thursday June 22, 2023 @08:51AM (#36431360)
Java is clearly influenced by Objective-C and Smalltalk in semantics.

Not only their authors are on the record saying so, Java EE is inspired in an Objective-C framework (Distributed Objects Everywhere), and Hotspot is the evolution of Strongtalk JIT.

Re:Object-oriented Programming with ANSI-C (1993) [pdf] by gpderetta on Thursday June 22, 2023 @09:12AM (#36431633)
I'm sure that Objective-C and Smalltalk have also been strong influences, especially in the libraries. But I would say that the OO semantics are very Simula like.

Can you really claim as Smalltalk inspired a language without an easy to use DoesNotUderstand? That's pretty much the basis for first class messages and transparent delegation.

Also: https://www.youtube.com/watch?v=ccRtIdlTqlU

Re:Object-oriented Programming with ANSI-C (1993) [pdf] by pjmlp on Thursday June 22, 2023 @01:47PM (#36435975)
Java authors are quite clear where the semantics come from,

https://cs.gmu.edu/~sean/stuff/java-objc.html

The C++ like syntax was to make it more marketable.

Java, like Smalltalk and Objective-C, and others in Xerox linage, is a full stack experience, naturally one cannot dissociate the language from the JVM, that is programming with one arm tied behind the back. Language and platform were designed to work together.

As for doesNotUndertstand, for some limited use cases you would use dynamic proxies,

https://docs.oracle.com/javase/8/docs/technotes/guides/refle...

Tutorial is for Java 8, but java.lang.reflect.Proxy exists since Java 3 (1.3).

And as for reaching out to JVM low level stuff, there is invokedynamic, JVM version of .NET DLR.

Also this meta-level programming is quite common in Smalltalk, when playing around with metaclasses, and Smalltalk APIs for the VM.