: New:

I'm learning Objective-C for work. (We have SDKs for folks who want to write apps that talk to banks, and one of those SDKs is for iOS, which is an 🍎 thing, and thus uses Objective-C.) It's been a trip down memory lane. Not because I've used Objective-C before—I haven't. Rather, because I worked with programming languages designed during the same era. Around 1990, folks were figuring out how to smoosh object-oriented programming into their programming languages. Objective-C came along during this time. Meanwhile, I was working at GeoWorks, documenting how to write apps for our operating system that was, enthusiastically but unwisely, competing with Microsoft Windows. We ("we" being, if I remember correctly, mostly Tony Requist) designed an object-oriented programming language GoC ("geo-C"). And when we explained it to folks, we ran into issues that I see echoed in these Objective-C documentation pages I'm reading now. The whole concept of objects, so mysterious. (And nowadays, so commonplace.) The need to explain "message passing".

The silver lining to being crushed by Microsoft's illegal tactics where Apple survived: 20+ years later, we don't have to justify the design decisions that went into the now-forgotten GoC. Some parts of Apple's Objective-C have not aged well, and I find myself smirking at the ancient voices echoing through its documentation.

Objective-C uses long names for things. Where most languages that needed to append strings together might name a string method "append", the Objective-C equivalent is "stringByAppendingString". They were proud of these long names. "This is one of the features that helps make Objective-C such a readable language," the documentation proudly states. And yet, you know they don't still believe this. A few years back, Apple designed a new programming language, Swift. Rather than re-write all of their interfaces from scratch, they wrote a tool to do some automatic translation. But this tool didn't just translate the code-ish parts. It also translated the names: it looked for some common wordy idioms in Objective-C names and shortened them for Swift.

(Though some parts of Objective-C remind me of GoC, over-long names weren't part of that… Probably because GeoWorks was a company of assembly-language hackers who were used to to keeping track of things called ax and bx.)

Anyhow, it's been a nostalgic time, thinking about messages and properties and such. I feel like the old town native talking to new arrivals. "You kids today have no idea what this place was like back then. I remember when those properties were just fields."

Tags: programming

lahosken@gmail.com
blog comments powered by Disqus

Tags