Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.programming.threads > #7447
| From | Bart <bc@freeuk.com> |
|---|---|
| Newsgroups | comp.programming.threads, comp.lang.c |
| Subject | Re: Linus Torvalds prepares to move the Linux kernel to modern C |
| Date | 2022-03-01 11:34 +0000 |
| Organization | A noiseless patient Spider |
| Message-ID | <svl0cj$e9u$1@dont-email.me> (permalink) |
| References | <88f5394b-c1a1-4422-a20f-96e5511a178fn@googlegroups.com> <svj1m6$rue$2@dont-email.me> <svjsnm$dnp$1@dont-email.me> <svjsuj$eoc$1@dont-email.me> <svk03m$3ac$1@dont-email.me> |
Cross-posted to 2 groups.
On 01/03/2022 02:23, Lynn McGuire wrote:
> On 2/28/2022 7:29 PM, rthiebaud wrote:
>> On 2/28/22 20:26, Lynn McGuire wrote:
>>> On 2/28/2022 11:44 AM, Bonita Montero wrote:
>>>> Am 28.02.2022 um 17:43 schrieb Amine Moulay Ramdane:
>>>>> Hello,
>>>>>
>>>>>
>>>>> Linus Torvalds prepares to move the Linux kernel to modern C
>>>>>
>>>>> The Linux kernel's foundation is the ancient C89 standard of C.
>>>>> Now, Torvalds has decided to upgrade to 2011's more modern C11
>>>>> standard.
>>>>>
>>>>> Read more here:
>>>>>
>>>>> https://www.zdnet.com/article/linus-torvalds-prepares-to-move-the-linux-kernel-to-modern-c/?ftag=COS-05-10aaa0h&utm_campaign=trueAnthem%3A%20Trending%20Content&utm_medium=trueAnthem&utm_source=facebook&fbclid=IwAR1oF1ysACG28YRYJnnYlt7oCzfRhXSUePOKd4xsycb3F8GGwxIfeAXZI8Y
>>>>>
>>>>>
>>>>>
>>>>> Thank you,
>>>>> Amine Moulay Ramdane.
>>>>
>>>> C isn't a modern language, no matter which standard.
>>>
>>> Sorry but you are wrong. There is more C code running out there than
>>> anything else. Just about every real time system is running C.
>>> Linux is totally written in C code. All engine management systems
>>> are running C. Etc, etc, etc.
>>>
>>> Lynn
>>
>> How does the number of lines of C running compare to the number of
>> lines of Cobol running?
>
> Not even close, C big time the winner.
>
> Every single vehicle running in the USA has several cpus running 20
> million to 30 million lines of C code.
> Every single Android cell phone has a Linux operating system written in
> C. Every single Apple cell phone has an iOS operating system written in C.
>
> All Microsoft operating systems are written in C.
It uses a mix of languages, like .NET ones. Some APIs use C++. Many
still use C, although it likes to call it C++.
That is what is visible from the developer perspective. Internally, I've
no idea.
> All Apple PC
> operating systems are written in C. Linux is written in C. Unix is
> written in C. Etc, etc, etc.
I use Windows. My own stuff is 100% not written in C. It makes use of OS
and other libraries, which may well have been written in C, but when I
call code in those libraries, it will be as native code at that point,
not C.
The APIs used are generally refered to as C APIs, but it doesn't mean
that C invented that primitive style of interface, which these days
means using these types:
i8-i64
u8-u64
Arrays of any of these
Structs of any mix of these
Pointers to any of these
And using the machine ABI for function call conventions
Such types are common to at least a dozen languages, which will largely
follow the ABI too.
In the case of the ABI, Win64 ABI is not specified in C terms (on SYS V
it is, in that it uses C terms to describe the types).
Some C-language characteristics do appear in such APIs and ABIs:
* Variadic parameters
* The rules for struct member alignment and padding
* The weird 'char' type that is neither i8 nor u8
* Things like case-sensitivity in names shared between programs and
libraries
Otherwise, all those reams of C code could be replaced overnight by
another comparable language, or even assembly, and no one would notice
(other than it might be faster/slower or smaller/bigger).
The language called C could be split into two parts:
* The lower-level set of primitive types, the basic set of operators,
control-flow facilities, the concept of imported and exported names and
so on. A kind of VM if you like.
* The actual language C with its idiosyncratic syntax, its various
quirks and its messy attempts at providing those primitive types and a
million other things that people associate with it, like its macro
system, nested headers and lack of modules.
The first part is a common subset of many languages. Doubtless many
systems languages exist, have existed, or could exist that make short
work of such a language spec.
But it is a fact that C has dominated that area of mainsteam systems
languages, to the extent that there are hardly any viable alternatives.
(C++ doesn't count.)
There are a few languages around now that call themselves systems
languages, but I doubt if they could be implemented in 180KB (the size
of tcc.exe).
(There is my language, which I've used exclusively for systems work for
decades, but that is a personal tool so hardly mainstream.
But one reason why I didn't let it die 20 years ago is /because/ there
wasn't a small-footprint alternative to C that I could switch to.)
Back to comp.programming.threads | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Linus Torvalds prepares to move the Linux kernel to modern C Amine Moulay Ramdane <aminer68@gmail.com> - 2022-02-28 08:43 -0800
Re: Linus Torvalds prepares to move the Linux kernel to modern C Bonita Montero <Bonita.Montero@gmail.com> - 2022-02-28 18:44 +0100
Re: Linus Torvalds prepares to move the Linux kernel to modern C Lynn McGuire <lynnmcguire5@gmail.com> - 2022-02-28 19:26 -0600
Re: Linus Torvalds prepares to move the Linux kernel to modern C rthiebaud <thiebauddick2@aol.com> - 2022-02-28 20:29 -0500
Re: Linus Torvalds prepares to move the Linux kernel to modern C Lynn McGuire <lynnmcguire5@gmail.com> - 2022-02-28 20:23 -0600
Re: Linus Torvalds prepares to move the Linux kernel to modern C Bart <bc@freeuk.com> - 2022-03-01 11:34 +0000
Re: Linus Torvalds prepares to move the Linux kernel to modern C Bonita Montero <Bonita.Montero@gmail.com> - 2022-03-01 14:31 +0100
Re: Linus Torvalds prepares to move the Linux kernel to modern C David Brown <david.brown@hesbynett.no> - 2022-03-01 17:25 +0100
Re: Linus Torvalds prepares to move the Linux kernel to modern C Bonita Montero <Bonita.Montero@gmail.com> - 2022-03-01 18:13 +0100
Re: Linus Torvalds prepares to move the Linux kernel to modern C David Brown <david.brown@hesbynett.no> - 2022-03-01 19:42 +0100
Re: Linus Torvalds prepares to move the Linux kernel to modern C Bonita Montero <Bonita.Montero@gmail.com> - 2022-03-01 19:56 +0100
Re: Linus Torvalds prepares to move the Linux kernel to modern C Vir Campestris <vir.campestris@invalid.invalid> - 2022-03-03 21:41 +0000
Re: Linus Torvalds prepares to move the Linux kernel to modern C scott@slp53.sl.home (Scott Lurndal) - 2022-03-01 15:14 +0000
Re: Linus Torvalds prepares to move the Linux kernel to modern C Kaz Kylheku <480-992-1380@kylheku.com> - 2022-03-01 01:37 +0000
Re: Linus Torvalds prepares to move the Linux kernel to modern C Manu Raju <MR@invalid.invalid> - 2022-03-01 05:11 +0000
Re: Linus Torvalds prepares to move the Linux kernel to modern C Bonita Montero <Bonita.Montero@gmail.com> - 2022-03-01 08:31 +0100
Re: Linus Torvalds prepares to move the Linux kernel to modern C Lynn McGuire <lynnmcguire5@gmail.com> - 2022-03-01 22:45 -0600
Re: Linus Torvalds prepares to move the Linux kernel to modern C Bonita Montero <Bonita.Montero@gmail.com> - 2022-03-02 05:46 +0100
Re: Linus Torvalds prepares to move the Linux kernel to modern C Bart <bc@freeuk.com> - 2022-03-02 13:47 +0000
Re: Linus Torvalds prepares to move the Linux kernel to modern C rthiebaud <thiebauddick2@aol.com> - 2022-03-02 13:06 -0500
Re: Linus Torvalds prepares to move the Linux kernel to modern C Bart <bc@freeuk.com> - 2022-03-02 19:19 +0000
Re: Linus Torvalds prepares to move the Linux kernel to modern C Lynn McGuire <lynnmcguire5@gmail.com> - 2022-03-02 19:32 -0600
Re: Linus Torvalds prepares to move the Linux kernel to modern C "Gary R. Schmidt" <grschmidt@acm.org> - 2022-03-03 14:56 +1100
Re: Linus Torvalds prepares to move the Linux kernel to modern C Bonita Montero <Bonita.Montero@gmail.com> - 2022-03-03 14:02 +0100
Re: Linus Torvalds prepares to move the Linux kernel to modern C Manfred <noname@add.invalid> - 2022-03-03 15:09 +0100
Re: Linus Torvalds prepares to move the Linux kernel to modern C Bonita Montero <Bonita.Montero@gmail.com> - 2022-03-03 15:14 +0100
Re: Linus Torvalds prepares to move the Linux kernel to modern C Bonita Montero <Bonita.Montero@gmail.com> - 2022-03-02 19:17 +0100
Re: Linus Torvalds prepares to move the Linux kernel to modern C scott@slp53.sl.home (Scott Lurndal) - 2022-03-02 14:42 +0000
Re: Linus Torvalds prepares to move the Linux kernel to modern C Bonita Montero <Bonita.Montero@gmail.com> - 2022-03-02 19:18 +0100
Re: Linus Torvalds prepares to move the Linux kernel to modern C scott@slp53.sl.home (Scott Lurndal) - 2022-03-02 18:33 +0000
Re: Linus Torvalds prepares to move the Linux kernel to modern C Bonita Montero <Bonita.Montero@gmail.com> - 2022-03-02 19:39 +0100
Re: Linus Torvalds prepares to move the Linux kernel to modern C "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2022-03-02 11:05 -0800
Re: Linus Torvalds prepares to move the Linux kernel to modern C "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2022-03-03 12:25 -0800
Re: Linus Torvalds prepares to move the Linux kernel to modern C Bonita Montero <Bonita.Montero@gmail.com> - 2022-03-03 21:37 +0100
Re: Linus Torvalds prepares to move the Linux kernel to modern C "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2022-03-03 12:59 -0800
Re: Linus Torvalds prepares to move the Linux kernel to modern C Bonita Montero <Bonita.Montero@gmail.com> - 2022-03-04 11:35 +0100
csiph-web