I have an inclination towards objective-c as my language of choice. I see it as an excellent kernel level object oriented language, being a strict superset of C. However I have come across a problem. Since Objective-C is almost entirely dominated by Apple, (gnuStep is kinda there, but not really) there is NO documentation I can find for the runtime spec from the original language specification, hell I can't find a language specification. Any help on that would be nice.
As a secondary thought: what is the aversion to this? Am I missing a red flag of all this?
Implementing an Objective-C runtime
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: Implementing an Objective-C runtime
The thing to be especially wary about is that Objective-C uses runtime dynamic linking, and that initializing an Objective-C object is likely to depend on a full-blown memory manager before you even get to sending -(id)init.
Other than that, my method for porting runtime is just to drop it into your project, try building it, store the few MB of errors into a file and then go tackling the issues one at a time.
As far as specifications are concerned, there are quite a few bits and pieces hidden across developer.apple.com, but it's sadly for us mostly targeted at users, not implementers.
Other than that, my method for porting runtime is just to drop it into your project, try building it, store the few MB of errors into a file and then go tackling the issues one at a time.
As far as specifications are concerned, there are quite a few bits and pieces hidden across developer.apple.com, but it's sadly for us mostly targeted at users, not implementers.
- Primis
- Member
- Posts: 62
- Joined: Fri May 14, 2010 3:46 pm
- Libera.chat IRC: Primis
- Location: New York, NY
- Contact:
Re: Implementing an Objective-C runtime
As it would turn out, the Étolié Runtime from Carnegie Mellon, now shipping under the name "GNUStep-Runtime" which is part of the GNUstep project, is MIT licensed rather than the old GNU Runtime which was in fact GPL
It also has been updated to modern obj-c 2.0 and supports all the things you'd expect from the OS x runtime, but slightly slower.
I guess digging deep helps sometimes. Who knew that GNUStep had MIT licensed code!
It also has been updated to modern obj-c 2.0 and supports all the things you'd expect from the OS x runtime, but slightly slower.
I guess digging deep helps sometimes. Who knew that GNUStep had MIT licensed code!
Re: Implementing an Objective-C runtime
Hey,
Check out this project if you're looking for an alternative open implementation of the runtime https://webkeks.org/objfw/
Check out this project if you're looking for an alternative open implementation of the runtime https://webkeks.org/objfw/