Today, you probably don’t think much about object-oriented programming, it’s just part of the landscape. But decades ago, it was strange and obscure technology. While there were several languages that led up to the current object-oriented tools we use today, one of the most influential was Xerox PARC’s Smalltalk language. [Michael Engel] took a C++ implementation of the Smalltalk VM, some byte code for a complete Smalltalk system, a Raspberry Pi “bare metal” library, and produced a Smalltalk workstation running on a bare Raspberry Pi — even a Pi Zero. The code is on GitHub and is admittedly a work in progress.
Smalltalk was interesting — and sometimes annoying — because everything was an object. Literally everything. The system took over the entire machine. It provided the GUI, the compiler, and the run time libraries. That’s probably why it was easy for [Michael] to forego the usual Linux OS for his project.
If you don’t want to use a spare flash card to boot into the system, there are Smalltalk 80 versions that run on normal operating systems. The tutorial in that program’s user manual might be helpful to you if you haven’t done Smalltalk before.
Even a lowly integer is a full-scale object in Smalltalk. When you say “3+2” you are actually saying, in Smalltalk, that you have an integer object with value 3 that receives a + message with an integer argument of 2. If you were trying to wrap your mind around object-oriented principles, this was very confusing, although with a few decades of hindsight, it makes more sense. Smalltalk also did a lot to popularize the model/view/controller design for graphical user interface software.
We’ve looked at object-oriented for state machines before, which is a nice use case. If you want to see just how well PARC predicted the future, check out the mother of all demos.
No comments:
Post a Comment