Plus exactement l'IOKit est écrit en Embedded-C++, un sous-ensemble du C++ (sous la forme d'une norme) qui retire les fonctionnalités coûteuses tout en gardant les principaux avantages objet du C++. Ce qui en fait un langage tout à fait sérieux pour la programmation système.
Voici ce qu'en dit la doc d'IOKit :
"Language Choice
Apple considered several programming languages for the I/O Kit and chose a restricted subset of C++. This subset is based on the Embedded C++ specification (http://www.caravan.net/ec2plus/(...)).
C++ was chosen for several reasons. The C++ compiler is mature and the language provides support for system programming. In addition, there is already a large community of Macintosh (and BSD) developers with C++ experience.
The restricted subset disallows certain features of C++, including
- exceptions
- multiple inheritance
- templates
- runtime type information (RTTI)?the I/O Kit uses its own implementation of an runtime typing system
These features were dropped because they were deemed unsuitable for use within a multithreaded kernel. If you feel you need these features, you should reconsider your design. You should be able to write any driver you require using I/O Kit with these restrictions in place."
[^] # Re: C++
Posté par Pierre . En réponse à la dépêche Patch pour le support du C++ dans le noyau. Évalué à 2.
Voici ce qu'en dit la doc d'IOKit :
"Language Choice
Apple considered several programming languages for the I/O Kit and chose a restricted subset of C++. This subset is based on the Embedded C++ specification (http://www.caravan.net/ec2plus/(...)).
C++ was chosen for several reasons. The C++ compiler is mature and the language provides support for system programming. In addition, there is already a large community of Macintosh (and BSD) developers with C++ experience.
The restricted subset disallows certain features of C++, including
- exceptions
- multiple inheritance
- templates
- runtime type information (RTTI)?the I/O Kit uses its own implementation of an runtime typing system
These features were dropped because they were deemed unsuitable for use within a multithreaded kernel. If you feel you need these features, you should reconsider your design. You should be able to write any driver you require using I/O Kit with these restrictions in place."