Syntax of the Future Past
There is a fair amount of complaining on The Internets at the moment about Objective-C and Apple’s choice to use it for the iPhone. Many newcomers to the ‘platform’ (if I can apply a singular name to Mac and iPhone development) are finding the language - and the Cocoa frameworks based on it - very confusing. Just how can a language with sooooo many square brackets! be at-all easy to use, after all?
This provoked some deja-vu. Hadn’t, my vague memories asked me, this complaining been done before? I seemed to remember some talk of an “alternate syntax” for Objective-C based on dots from my first WWDC trip in 2001. I turned to the Internet.
It turns out that, yes, this has happened before. Back in 1997, in the Rhapsody days, when Aqua was but a twinkle in Steve Jobs’ eye and the iPhone would have been indistinguishable from magic, Apple was concerned that developers coming from other platforms coming to Rhapsody were intimidated by the Obj-C syntax, and that something would have to be done. The answer was to be the Modern Syntax.
There’s precious little on the web about the proposal. In researching it, I felt a bit like an information archaeologist. These were the days before blogs, remember, and the Rhapsody community was basically composed of the small number of NeXT developers so confident in the technology that they had actually managed to delude themselves into thinking that beleaguered Apple could make it successful where NeXT had failed. What little information that is still available is on Usenet newsgroups (thank you, Google, for preserving these), mailing list archives and magazine articles (remember when magazines were a source of cutting-edge information?).
The earliest references I could find were some talk of the proposal on the Omni Group’s macosx-talk list in 1997. It was plainly a serious proposal at the time. Quoting from Christopher Nagel’s message about the syntax in which he quotes from an Apple document:
“The current message expression syntax of Objective-C is based on Smalltalk. This syntax is sometimes referred to as the classic syntax. There is a proposal to create a modern syntax for message expressions based on Java and C++, because of its greater familiarity. This also is a step toward enabling developers to use either Java or Objective-C to access the libraries. You should be aware as you study Objective-C that the message expression syntax is likely to change in the Rhapsody release to the modern syntax.”
The proposal was controversial, to say the least. On the one hand, it did seem to imply that Objective-C would live on at a time where its community felt very threatened by Java (amongst other things), but on the other hand, it was destroying what some saw as the ‘beauty’ of the language, and what little concrete was leaking out of Apple about it did not appear well thought-out. The proposal did get to the implementation stage, at least within Apple, and the syntax did exist - there was even a compiler flag to turn it on, as this message to comp.lang.objectivec circa 2001 attests (although by that time, the effort had been abandoned), but I could find no concrete examples of it. This 1997 MachTech article, an interview with the authors of CodeWarrior (remember that?), shows their take on it. They obviously thought that the syntax was coming, and here to stay. No methods with more than one argument are shown though, and they say that “We will support this as a real modern syntax specification falls into place”, which implies that the syntax they show might all be guesswork on their part. If anyone has some real examples of Modern Syntax Objective-C, I would be intrigued to see them.
In the end, the revolt from the ObjC community (and perhaps also, if I was to speculate, technical arguments inside Apple akin to the ones taking place on the Omni lists that I linked to above) killed the proposal. By October 1997 - only three months after the original proposals were being discussed - this quote from an Apple Rhapsody FAQ was posted to Omni’s macosx-dev mailing list:
Q: Will you be adding "modern syntax" for Objective-C?
A: At WWDC, we discussed an investigation into a modern syntax. It became clear that Objective-C developers prefer the current syntax, and that programmers of other languages were eager to use Java as their language of choice. As a result we will focus our efforts on moving Objective-C forward and deliver a complete Java solution. The modern syntax effort will not continue
This was not the triumph that the ObjC guys were hoping for, however. By 2001, Cocoa-Java was being pushed as the next-big-thing, and Objective-C was still in for a tumultuous ride. But that’s another story.