3 ms·
Simula67, arguably the first OO language, was centered around inheritance. The other early major OO language was obviously Smalltalk which focused on message p
by gpderetta 3y ago
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.
- pjmlp 3y agoJava 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.
- gpderetta 3y agoI'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 https://www.youtube.com/watch?v=ccRtIdlTqlU edit: you could say that the JVM itself is more explicitly smalltalk-inspired as, AFAIK, has closer to fist class messaging support, but this power is hidden to the typical java program under a more interface oriented design. To reach the full power you have to escape form java into the meta-level via introspection.
- pjmlp 3y agoJava authors are quite clear where the semantics come from, https://cs.gmu.edu/~sean/stuff/java-objc.html 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/reflection/proxy.html 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.