Page 2 of 2

Re: Objective C vs C for kernel space?

Posted: Thu Jun 04, 2009 9:44 am
by Colonel Kernel
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.

Re: Objective C vs C for kernel space?

Posted: Thu Jun 04, 2009 11:18 am
by steveklabnik
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.

Re: Objective C vs C for kernel space?

Posted: Thu Jun 04, 2009 11:59 am
by inx
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.
This depends on the implementation. It seems likely to me that you were looking at the GNU runtime, and from what I've heard,
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.