3 ms·
The author's notion of OO is intentionally narrow. I don't know about Simula, but C++ is still reasonably close to Algol, compared to what Smalltalk and Self br
by Mesopropithecus 3y ago
The author's notion of OO is intentionally narrow. I don't know about Simula, but C++ is still reasonably close to Algol, compared to what Smalltalk and Self bring to the table (the author also mentions programming environments vs. text files).
If you accept that narrow definition at least for the scope of the article, it makes sense.
- vidarh 3y agoIt's exceptionally narrow, in that it rules out the vast majority of languages that even purists would agree are OO. E.g. in Ruby you can not take the value of anything and get anything but an object (e.g. integers are objects, true is an object, nil is an object), but Ruby is not an OO language by the article's definition because it fails the part about conditionals. Even though you can do this in Ruby (probably buggy, just threw it together) - it's just not idiomatic and the language has syntactic sugar for "less OO" forms: def true.ifTrue; yield; true; end def true.ifFalse; true; end def false.ifFalse; yield; true; end def false.ifTrue; false; end (1 < 5).ifTrue { puts "TRUE!" }.ifFalse { puts "FALSE!" } # Or: (1 > 5).ifTrue { puts "TRUE!" }.ifFalse { puts "FALSE!" } So it might make sense if you accept that narrow definition, but I don't think many people will find that narrow definition to make sense. I certainly don't.
- int_19h 3y agoSimula itself was almost a superset of Algol-60. It's pretty much Algol-60 cleaned up a little bit and with a Java-like object model bolted on top. C++ is a direct descendant of that, sometimes even syntactically - e.g. the keywords "class", "new", and "virtual" all come from Simula where they had largely the same meaning. It's close enough to our mainstream OO languages today that Simula code can be easily understood, at least so long as it doesn't use the async features: https://rosettacode.org/wiki/Abstract_type#Simula https://rosettacode.org/wiki/Abstract_type#Simula