3 ms·
Could someone enlighten me as to how Java style OOP differs from Smalltalk's variant? I've read the Alan Kay quote on how he's sorry for focusing on objects ins
by snazz 8y ago
Could someone enlighten me as to how Java style OOP differs from Smalltalk's variant? I've read the Alan Kay quote on how he's sorry for focusing on objects instead of message passing but I'm still unsure on how Smalltalk is so much better not having used it.
- dnautics 8y agoI can't speak for smalltalk but the actor model in erlang (but especially in elixir) is a joy.
- timbit42 8y agoThis may not answer your question and may not be 100% correct. Message passing means that objects have their own data and do not have shared access to it. This makes multi-threading and parallelized code very easy to do because you don't have to worry about data changing unexpectedly. Clojure, and other languages, achieve this by making data immutable, which has a similar effect. As you mentioned, after Alan Kay used the term "object-oriented" to describe Smalltalk, people focused on the objects instead of the messages and created languages designed around the idea of being object-oriented instead of around message passing (I believe Objective-C and Ruby do message passing), thereby missing the benefit. All OOPLs not based on message passing should die. Also, unlike Java, Smalltalk has no classes. Any existing object can be used as a template to create a new object.