← Back to context

Comment by astrange

3 years ago

They are written in a strange subset of C++ with its own inheritance system and currency classes.

In NeXTStep they were written in ObjC, and probably should've stayed that way.

Just like UNIX kernel code is a strange subset of C.

I always find strange how "kernel C" is C, even though ISO C would bork in kernel space, but doing a similar C++ subset is pointed out as not being C++.

  • I'd also call kernel C strange. Mostly justified, but there's no particular reason the memory allocation call with the same behavior as malloc() in IOKit isn't named malloc().

> They are written in a strange subset of C++ with its own inheritance system and currency classes.

Can someone explain? Is there something other than DriverKit, which seems to be C++?

https://developer.apple.com/documentation/driverkit