3 ms·
While that's true historically, SmallTalk has more in common with some functional languages (like erlang) than it does with even Ruby, which is directly a Small
by dnautics 6y ago
While that's true historically, SmallTalk has more in common with some functional languages (like erlang) than it does with even Ruby, which is directly a SmallTalk derivate.
I think when everyone talks about OOP today they mean the lineage that descended from C++, which broadly is: Java, Javascript, C#, Python, and Ruby, to a lesser extent Go.
Contemporary OOP is the enforced semantic association of data with their methods, encapsulation of private data, and shared memory.
- antirez 6y agoRuby and C++ OOP don't belong to the same lineage. Ruby is effectively "Smalltalk alike" OOP IMHO.
- dnautics 6y agoIt is under the hood but all of that is heavily encapsulated to make it more like other algol languages that people are familiar with.
- andrekandre 6y agothats really interesting what are the big differences that make ruby more algol-like? and conversely, what are the smalltalk features that make it less so?
- dragonwriter 6y ago> SmallTalk has more in common with some functional languages (like erlang) than it does with even Ruby, which is directly a SmallTalk derivate. Having used all three of the named languages, I disagree. Smalltalk has a lot more in common with Ruby than Erlang. > I think when everyone talks about OOP today they mean the lineage that descended from C++, which broadly is: Java, Javascript, C#, Python, and Ruby, to a lesser extent Go. Ruby, as you yourself noted, descends from Smalltalk, not C++. JavaScript descends from Self, not C++. Python doesn't really seem to descend from C++ either. I think you are confusing having (very loosely, in some cases) Algol-derived syntax for being descended from C++. > Contemporary OOP is the enforced semantic association of data with their methods, encapsulation of private data, and shared memory. I disagree with this description; shared memory is orthogonal to OOP, and encapsulation isn't even provided without awkward gymnastics in some of the contemporary OOP languages you (erroneously) describe as C++ descendants (e.g., Python has a unenforced convention for notating that a member should be considered private, and Ruby has private methods and makes instance variables essentially private, but also includes encapsulation-busting methods near the top of the inheritance heirarchy, like Object#instance_eval.) And without strict encapsulation, enforced syntactic association of methods with data also doesn't exist (not sure what enforced semantic association is supposed to mean, unless it is enforced by way of enforced syntactic association.)