Deutsch English Français Italiano |
<vo7u80$3nof$3@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail From: RonB <ronb02NOSPAM@gmail.com> Newsgroups: comp.os.linux.advocacy Subject: Re: My Hate List (Revised) Date: Sat, 8 Feb 2025 15:46:09 -0000 (UTC) Organization: A noiseless patient Spider Lines: 41 Message-ID: <vo7u80$3nof$3@dont-email.me> References: <pan$a309c$8265f602$7381169d$758bc827@linux.rocks> <vn65ri$3oar$1@dont-email.me> <vnr659$sm3j$1@solani.org> <67A2CB47.1FEA@ix.netcom.com> <vnuovm$uipk$1@solani.org> <67A2F582.48EC@ix.netcom.com> <vnutgn$uko5$1@solani.org> <67A3204C.5519@ix.netcom.com> <fma7qjp7klup86p06073dveabhvvfb0u8t@4ax.com> <m0j5n2Flj14U8@mid.individual.net> <gmo8qjl6troru0bj71qrmte4fp0l7r3vb8@4ax.com> <m33pP.381935$HO1.289408@fx14.iad> <4gj9qj9bh76le8nih8g2lgfre5q88hlkfh@4ax.com> <2p4pP.2117978$oR74.1555797@fx16.iad> <vo2nj9$31c67$1@dont-email.me> <Gs5pP.2445098$bYV2.225314@fx17.iad> <vo2oho$31c67$3@dont-email.me> <A36pP.1498748$2xE6.919351@fx18.iad> <vo4du2$3dg8k$4@dont-email.me> <qAopP.20069$dxRc.14349@fx13.iad> <vo5i8n$3jkkc$7@dont-email.me> <dgypP.71462$YsRf.65125@fx18.iad> <vo71gi$3un43$4@dont-email.me> <67a73079$0$5186$426a34cc@news.free.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Date: Sat, 08 Feb 2025 16:46:09 +0100 (CET) Injection-Info: dont-email.me; posting-host="3e2a582780ad21df83ca7d7403115706"; logging-data="122639"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18A6S1uhymeVyBHO0KEi5tt" User-Agent: slrn/1.0.3 (Linux) Cancel-Lock: sha1:4Ivh2jm9uPQVzmnZ9ymgokACLTM= On 2025-02-08, Stéphane CARPENTIER <sc@fiat-linux.fr> wrote: > Le 08-02-2025, RonB <ronb02NOSPAM@gmail.com> a écrit : >> >> I do know there is some kind of debate >> over Rust. I'm not a developer so I don't really understand what it's all >> about. > > The reason to move from C to Rust is for safety. > > For example, when a developer has to manage the string "hello world". He > has to reserve enough memory to store it but not too much to avoid > wasting it. And he needs to access it, so he has a variable of twelve > octets. Yes, twelve: one octet by letter, one octet for the space and > one octet for the end of the string \0. The last one being very easy to > forget. And if the string is longer than the memory reserve to store it, > it will overwrite the value of another variable. With a lot of weird > side effects. > > Of course, in modern C, there are possibilities to have your compiler > help you with that. But it's only an example easy to understand. There > are more subtle ways to mess up with your code. That's why C wasn't used > in embedded code, ADA was used because it's more difficult to compile, > but once compiled, you would be sure it wouldn't fail. > > And that's the reason why Rust is chosen over C. It's difficult to > learn, but it's better at getting a secured code. > > Now, for the controversy about Rust in the kernel is not about the > quality. It's because the C code must evolve to be able to interact with > Rust code. And that's something that hasn't been anticipated. And The > developers don't want to change their code just because their program is > called by a Rust program and not by a C program. That's the controversy. > It has nothing to do with the quality of code, it has to do with impacts > of Rust on their code. Thanks for the explanation. I'll never write Rust code or C code, but this has helped me to understand what's going on. -- “Evil is not able to create anything new, it can only distort and destroy what has been invented or made by the forces of good.” —J.R.R. Tolkien