Why do linus written Linux kernels without C ++?

xiaoxiao2021-03-06  34

Comment: << Why don't Linux kernels with C ? The postman wrote 'in the recent discussion of LKML for Macolex Macolex, linus gave the reason why no C to write Linux kernel: In the recent discussion about LKML, Linus gives why not C Reasons for writing Linux kernels: "IN FACT, IN LINUX WE DID TRY C Once Already, Back in 1992. It sucks. Trust Me - Writing Kernel Code In C Is A Bloody Stupid Idea." In fact, we have tried C is written, it is in 1992. very bad. I believe I - Write the kernel code with C is a very stupid idea. "" The fact is, C compilers are not trustworthy They were even worse in 1992, but some fundamental facts have not changed:... 1) the whole C exception handling thing is fundamentally broken It's _especially_ broken for kernels 2) any compiler or language that likes to hide things like memory allocations behind your back just is not a good choice for a kernel. 3) you can write object-oriented code (useful for filesystems etc) in C, _without_ the crap that is C . " "In fact, the C compiler is very unreliable. The situation is very bad in 1992, and some foundations have not changed yet: (1) The whole C to Exception is not complete, especially when writing the kernel. (2) Any compiler or program language that likes to hide the functionality related to memory allocation is a wrong choice for writing the kernel. (3) In C. You can also write object-oriented code (it is useful when writing the file system), it is not required to C . LinuxByte.Net News report strives to provide you with the fastest, latest, most pragmatic Linux industry news, welcome to reprint. Please record the news, the author name and keep this statement. Thank you for your cooperation. Publisher: wangxiaohu from : http://kerneltrap.org/node/view/2067 '

转载请注明原文地址:https://www.9cbs.com/read-64435.html

New Post(0)