Out of curiousity, can objective-c be used for os developement? Or do the runtime "features" get in the way?
Thanks!
Using Obj-C
Re:Using Obj-C
The simple answer is: yes. After all, it just gets compiled to C code anyways.
Look at the dependencies of libobjc. If it is relatively independent, then you should be able to just link it in. You may have to implement some POSIX functions that your kernel does not provide yet. At worst, you may have to write dummy implementations of some functions to make it link properly, or crack open the source of the library and remove the references to these functions.
The worst part may be the memory management. Something tells me that the dynamic nature of Objective-C means a lot of dynamic memory management goes on behind the scenes, which may not be available in the early stages of the boot process.
I'm not sure if anyone's done it before. I haven't heard of anyone. It should be an interesting project, and I encourage you to post an article of your findings if you get it to work.
Good luck.
Look at the dependencies of libobjc. If it is relatively independent, then you should be able to just link it in. You may have to implement some POSIX functions that your kernel does not provide yet. At worst, you may have to write dummy implementations of some functions to make it link properly, or crack open the source of the library and remove the references to these functions.
The worst part may be the memory management. Something tells me that the dynamic nature of Objective-C means a lot of dynamic memory management goes on behind the scenes, which may not be available in the early stages of the boot process.
I'm not sure if anyone's done it before. I haven't heard of anyone. It should be an interesting project, and I encourage you to post an article of your findings if you get it to work.
Good luck.