DEV Community

Discussion on: Object oriented programming, the beginning

Collapse
 
aminmansuri profile image
hidden_dude

While Simula was the first to have some of these features. It really was Alan Kay's team's invention Smalltalk that shaped what today is considered OO.

Smalltalk was simple (simpler than Python) its syntax can be explained in one line:

      object message.

You have some instance of an object and you send it a "message" that message "selects" a method in the inheritance hierarchy and executes it. You can also do things like:

     object message: otherObject andAlso: anotherObject.

This would pass otherObject and anotherObject to the method selected by message:andAlso: in object's class hierarchy.

That's pretty much Smalltalk's entire syntax. To create classes, define methods, etc.. you use this syntax.
(there is some additional punctuation for local variables, semi-colons, etc.. but its minimal)

"Modern" OO languages suffer from excessive bloat. Mainly because:

  1. Smalltalk was ahead of its time
  2. Smalltalk relied on a VM and garbage collection in the era of 64K RAM. (Ie. PCs in 1980 couldn't handle its size/RAM requirements)
  3. Other barriers such as the fact that it was interpreted, etc..

All those barriers no longer exist today, so people have slowly introduced Smalltalk features in Python, then Java, then Ruby. But none of these approach the Smalltalk simplicity. Its too bad it didn't catch on.

Collapse
 
madhadron profile image
Fred Ross

I know Smalltalk, and I think object oriented programming as taught and practiced broadly today owes more to Simula. The idea that the language itself should be a programmable thing was the key of Smalltalk. Python, Ruby, etc. are all still using it as a way to create fancy record types.

And I originally planned to make this a series of posts, going into Smalltalk, then exploring the later lineages (Grady Booth's super structured approach, Self's getting rid of classes), but realize that I didn't have time.