Every now and then I get the urge to write my own programming language. One of the problems I have run into time and time again is “How do you write an Object Oriented Language?” I’ve found lots of books on writing C like programming languages but very few actually talk about implementing the object oriented part of the language. When I talk to people that should know this kind of thing often the response is “Well that’s easy. You just create these structures and magic magic magic and you’re all set.” It’s the magic, magic, magic part that I want to understand.
More recently, and I don’t mean last week or last month, I got back onto this kick of writing my own language again but something different happened this time. I came across a book called Object Oriented Programming in ANSI C written by Axel-Tobias Schreiner back in 1994. While the book is long out of print it seems that a PDF of the book is available.
The book is an interesting especially if you want to understand the interworking of object oriented programming languages. It’s especially interesting when you notice that the way in which the book describes implementing object oriented programming is remarkably simular to the way in which Objective-C is implemented.