Hacking the Portable Object Compiler

Note: This article is a work in progress.

I’m partial to C for its simplicity and power, but I prefer to work in an object-oriented mindset when I write code. I’m no fan of the hot mess that is C++, however. So I was quite excited when I found Objective C a few years ago. Although from a syntactical standpoint, the language is clearly an imposition on the underlying C syntax, I think the overall effect is more intuitive and elegant than the Arcane Wizard Scrawl™ that C++ has become. I’d hoped to start using Objective C, by way of GCC, as my main programming language — but their desire to keep pace with Apple’s slow destruction of the language ruined those plans.

In an effort to find an alternative, I stumbled across the Portable Object Compiler. The basic syntax is the same as what Apple brought out of NeXT, except that protocols (interfaces) are not supported — though there are ways to live without this — and categories have to be implemented in a different fashion, albeit one that makes sense.

Intrigued, I downloaded the bootstrap compiler and compiler sources and…they didn’t compile on my Linux box.

(more…)