3 ms·
> Apple already uses C++ for device drivers, which allows for more safety oriented programming as straight C Just to qualify that a bit, IOKit uses a restrict
by huxley 10y ago
> Apple already uses C++ for device drivers, which allows for more safety oriented programming as straight C
Just to qualify that a bit, IOKit uses a restricted form of C++ based on Embedded C++
https://en.wikipedia.org/wiki/Embedded_C%2B%2B https://en.wikipedia.org/wiki/Embedded_C%2B%2B
https://developer.apple.com/library/content/documentation/DeviceDrivers/Conceptual/WritingDeviceDriver/CPluPlusRuntime/CPlusPlusRuntime.html https://developer.apple.com/library/content/documentation/De...
- pjmlp 10y agoIt still is C++ and way safer than plain C, assuming devs care to use RAII, reference parameters, string and array wrappers with bounds checking, enums.