我只是想知道谁知道Windows、Mac OS X和Linux是由哪些编程语言组成的,以及操作系统的每个部分都使用了哪些语言(例如:内核、插件架构、GUI组件等)。

我假设每种都有多种语言,显然我知道Linux内核是用C编写的。

我完全猜测Mac OS X包含大量Objective-C代码,因为它是苹果从NeXT派生的语言。

Windows,我听说包含C, c++和英特尔汇编。Linux或Mac OS是否包含任何汇编代码?

还有,是否有像Ruby, Python之类的脚本语言被操作系统开发者用来编写部分操作系统的脚本?操作系统的哪些部分是用每种语言编写的?


当前回答

I have read or heard that Mac OS X is written mostly in Objective-C with some of the lower level parts, such as the kernel, and hardware device drivers written in C. I believe that Apple "eat(s) its own dog food", meaning that they write Mac OS X using their own Xcode Developer Tools. The GCC(GNU Compiler Collection) compiler-linker is the unix command line tool that xCode used for most of its compiling and/or linking of executables. Among other possible languages, I know GCC compiles source code from the C, Objective-C, C++ and Objective-C++ languages.

其他回答

Mac OS X在一些库中使用了大量的c++,但由于担心ABI被破坏,所以没有公开。

windows: c++ linux: C mac: Objective C android: JAVA, C, c++ Solaris: C, c++ iOS 7: Objective-C,Swift,C, c++

作为Mac OS X核心的一个补充,Finder在Snow Leopard之前还没有用Objective-C编写。在Snow Leopard中,它是用Cocoa Objective-C编写的

你说得对,MacOSX的核心是Objective-C。

Windows C + +

Linux C

关于脚本语言,不,它们相当高级。

Windows:主要是C和c++,还有一些c#