Wednesday, January 2, 2008

The Great Programming Industry Reboot

A while back I bought a copy of Structured Programming (now available as a free PDF from the ACM), primarily so that I could read Dijkstra's essay "Notes on Structured Programming" (an expanded version of EWD249). In addition to "Notes on Structured Programming," it contains an essay by Hoare on "Data Structuring" and one by Hoare and Dahl on "Hierarchical Program Structures."

It was this last one, "Hierarchical Program Structures," which ended up having the greatest impact on me. It describes a programming language called Simula 67. Simula 67 is an extended version of Algol 60, which contains some extra simulation capabilities. It has these things called "classes" which each describe the behavior of a bunch of individual "instances." It has this "concatenation" thing which allows one class to include all of the attributes and behaviors of another class. There's also this "virtual" function thing, and it's statically typed and garbage collected.
The similarity to Java was so striking that I was depressed for days.

Then, I started looking a little bit forward and backwards from Java and Simula 67, and I found some interesting similarities between a progression of languages that happened since the microcomputer revolution and a progression that happened before the microcomputer revolution.

I'm trying to interpret history here, a good portion of which I did not live through, so I realize that I am entering dangerous territory. I encourage those of you who lived through this history to confirm and/or deny any parts of my speculation that you can.

I am more familiar with the more recent progression, so I'll start there. Microsoft's 4k Basic for the Altair (which you can try out on Peter Schorn's simh based Altair emulator) began a period of popularity for Basic, followed by one for Pascal and C, C++, and Java. Ignoring garbage collection in Basic, the rough order in which features were added is:
  • Formulas
  • High level control structures (for loops, while loops, if's with multi-line bodies, and such) and recursive functions
  • Classes, instances, inheritance, polymorphism, etc.
  • Garbage collection
I noticed that I can construct a very similar progression going from Fortran to Algol 60 to Simula 67, with the exception that the Object Oriented features come more or less at the same time as garbage collection.

Now I realize that I am picking and choosing my comparison points here, making me vulnerable to the Texas sharpshooter fallacy. I'm also using a progression of popular languages for the post-microcomputer languages and a progression languages that each sort of inspired the next for the pre-microcomputer languages. But I have often felt like history is repeating itself, and this particular pair of sequences worked as a lense to focus my thoughts.

I have a hypothesis that many parts of the programming industry essentially rebooted with the microcomputer revolution, and two possible reasons that may have contributed to this happening.

Possible reason #1: Alan Kay has argued that when people join a community faster than they can be socialized, a new pop culture develops where things which used to be common knowledge among the community become relatively little known. Is it possible that the microcomputer revolution caused the number of programmers to grow so quickly that the newer, larger, overall more ignorant programmer communities of the early 1980s needed to repeat the evolution that their predecessors from the mainframe and minicomputer eras went through?

Possible reason #2: The early microcomputers just didn't have the horsepower to run the more sophisticated programming systems that had been developed on mainframes and minicomputers. Trying to run a Smalltalk or Lisp system in 4k, or 32k, or 64k on a 1Mhz processor just wasn't particularly practical. By the mid 1980s the microcomputers were powerful enough to do some of the fancier stuff, but by then, maybe the new programmers had spent enough time in their impoverished environments that they were only able to be drug into higher level programming languages a little bit at a time?

If my speculations are true, then it is kind of depressing that we have lost so many years, but it is also kind of encouraging that we are making progress, because it would mean that we aren't stuck in an endless cycle of technology churn, reinventing the same thing over and over, but instead we are almost caught up to where we were before our industry did a great reboot, and we are getting closer to stepping into genuinely new territory.

If I were to continue the two progressions of languages that I made above, I would continue the older one into Smalltalk*, and the newer one into Ruby, with the new features being something like "reflection" and "late binding."

* Smalltalk was actually inspired by Simula I and not Simula 67, but Alan Kay's team paid a lot of attention to Simula 67 in the 1970s. I read somewhere (sorry, I can't find the link now) that Simula Begin was required reading
in the Learning Research Group at Xerox PARC.