内核开发和C ++ [英] Kernel development and C++

查看:201
本文介绍了内核开发和C ++的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从我知道,即使常见的操作系统有用其他语言编写的部分,内核也是用C编写的。

From what I know, even though the common OS have parts written in other languages, the kernel is entirely written in C.

我想知道是否可以用C ++编写内核

I want to know if it's feasible to write a Kernel in C++ and if not, what would be the drawbacks.

推荐答案

基本上,你必须为某些事情(如RTTI,异常)实现运行时支持,或者避免使用它们(只留下一部分C ++要使用)。

Basically, you either have to implement runtime support for certain things (like RTTI, exceptions), or refrain from using them (leaving only a subset of C++ to be used).

除此之外,C ++是更复杂的语言,所以你需要一个更有能力的开发者,不会拧。 Linus Torvalds讨厌C ++纯属巧合,当然。

Other than that, C++ is the more complex language, so you need to have a bit more competent developers that won't screw it up. Linus Torvalds hating C++ being purely coincidental, of course.

这篇关于内核开发和C ++的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆