Although they have a very large common subset, C is not a proper subset of C++. C and C++ have actually been evolving independently for a while now. There are new features in C99 that are not in standard C++ (variable length arrays, "restrict" keyword).
Every feature of C is automatically available in Objective-C -- it is a strict superset of C.
Objective C vs C for kernel space?
- Colonel Kernel
- Member
- Posts: 1437
- Joined: Tue Oct 17, 2006 6:06 pm
- Location: Vancouver, BC, Canada
- Contact:
Re: Objective C vs C for kernel space?
Top three reasons why my OS project died:
- Too much overtime at work
- Got married
- My brain got stuck in an infinite loop while trying to design the memory manager
- steveklabnik
- Member
- Posts: 72
- Joined: Wed Jan 28, 2009 4:30 pm
Re: Objective C vs C for kernel space?
This is a fairly common misconception, because originally, C++ was a superset. Not anymore.
http://en.wikipedia.org/wiki/Compatibil ... nd_C%2B%2B
Sorry, I would have posted the link before, I just thought it was common knowledge by now.
http://en.wikipedia.org/wiki/Compatibil ... nd_C%2B%2B
Sorry, I would have posted the link before, I just thought it was common knowledge by now.
Re: Objective C vs C for kernel space?
This depends on the implementation. It seems likely to me that you were looking at the GNU runtime, and from what I've heard,syntropy wrote:Then I saw the runtime and how many ugly hacks were put to use just to make it work with obscure architectures and quickly put down that idea. Don't try it, believe me. It's horrid.
the Apple(NeXT) runtime is much cleaner. The Apple runtime is also open source, although I don't know that the license
would be agreeable. Both of those options aside, if you're starting from scratch, you could make it cleaner than either. I doubt
that the ugliness in the current implementation is strictly due to the language itself.