Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.programming > #16822

Re: Informal discussion: comp.lang.rust?

From David Brown <david.brown@hesbynett.no>
Newsgroups comp.programming
Subject Re: Informal discussion: comp.lang.rust?
Date 2025-07-29 17:37 +0200
Organization A noiseless patient Spider
Message-ID <106apsa$2nju3$1@dont-email.me> (permalink)
References <vqmi1p$f1f$1@reader1.panix.com> <10686pv$24rjd$5@dont-email.me> <1068t09$7a8$1@reader1.panix.com> <106a04v$2hiar$1@dont-email.me> <106ae3k$i4b$1@reader1.panix.com>

Show all headers | View raw


On 29/07/2025 14:16, Dan Cross wrote:
> In article <106a04v$2hiar$1@dont-email.me>,
> Julio Di Egidio  <julio@diegidio.name> wrote:
>> On 29/07/2025 00:18, Dan Cross wrote:
>>
>>> I'm not terribly interested in marketing slogans, to be honest.
>>> "Safety" in this case has a very well-defined meaning, which may
>>> not be the same as yours.
>>
>> Maybe you don't realise it, but you are *only* repeating
>> the fake history and the fraudulent marketing slogans.
> 
> Unsupported assertions coupled with a lack of engagement with
> the material points under discussion are not persuasive.  If you
> disagree with any of my statements, you can engage with the
> arguments in good faith and provide data.
> 
> Or, if you prefer, how about a comparative study of a decently
> large program, one version written in C, and the other in Rust?
> Compare: https://github.com/dancrossnyc/rxv64 and
> https://github.com/mit-pdos/xv6-public
> 
> Otherwise, I suggest that you buckle up when you get behind the
> wheel.
> 

I personally don't know enough Rust to make any reasonable comparison 
with other languages.  I also think there is scope for all sorts of 
languages, and it seems perfectly reasonable to me for Rust to be 
"better" than C while also having C be "better" than Rust - different 
languages have their strengths and weaknesses.

But one thing that bothers me is that Rust advocates almost invariably 
compare modern Rust, programmed by top-rank programmers interested in 
writing top-quality code, with ancient C written by people who may have 
very different abilities and motivations.

Rust is the new, cool language - the programmers who use it are 
enthusiasts who are actively interested in programming, and talented 
enough to learn the language themselves and are keen to make the best of 
it.  C, on the other hand, has been the staple language for workhorse 
tasks.  The great majority of people programming in C over the decades 
do so because that's what they learned at university, and that's what 
their employers' pay them to write.  They write C code to earn a living, 
and while I am sure most take pride in their jobs, their task is not to 
write top-quality bug-free C code, but to balance the cost of writing 
code that is good enough with the costs and benefits to customers.

So it is an artificial and unfair comparison to suggest, as many Rust 
enthusiasts do, that existing C code has lots of bugs that could be 
prevented by writing the code in Rust - the bugs could be prevented 
equally well by one of those Rust programmers re-writing the code in 
good, modern C using modern C development tools.

I also see little in the way of comparisons between Rust and modern C++. 
  Many of the "typical C" bugs - dynamic memory leaks and bugs, buffer 
overflows in arrays and string handling, etc., - disappear entirely when 
you use C++ with smart pointers, std::vector<>, std::string<>, and the 
C++ Core Guidelines.  (Again - I am not saying that C++ is "better" than 
Rust, or vice versa.  Each language has its pros and cons.)


So while I appreciate that comparing these two projects might be more 
useful than many vague "C vs. Rust" comparisons, it is still a 
comparison between a 10-20 year old C project and a modern Rust design. 
The most immediate first-impression difference between the projects is 
that the Rust version is sensibly organised in directories, while the C 
project jumbles OS code and user-land utilities together.  That has, 
obviously, absolutely nothing to do with the languages involved.  Like 
so often when a Rust re-implementation of existing C code gives nicer, 
safer, and more efficient results, the prime reason is that you have a 
re-design of the project in a modern style using modern tools with the 
experience of knowing the existing C code and its specifications (which 
have usually changed greatly during the lifetime of the C code).  You'd 
get at least 90% of the benefits by doing the same re-write in modern C.


(As for the topic of this thread - Rust is getting steadily more popular 
regardless of what anyone may think about the language, so it's own 
newsgroup seems perfectly reasonable to me.)

Back to comp.programming | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Informal discussion: comp.lang.rust? cross@spitfire.i.gajendra.net (Dan Cross) - 2025-03-10 07:46 -0400
  Re: Informal discussion: comp.lang.rust? Tim Rentsch <tr.17687@z991.linuxsc.com> - 2025-03-10 07:14 -0700
    Re: Informal discussion: comp.lang.rust? Richard Harnden <richard.nospam@gmail.invalid> - 2025-03-10 16:42 +0000
      Re: Informal discussion: comp.lang.rust? c186282 <c186282@nnada.net> - 2025-06-18 02:51 -0400
        Re: Informal discussion: comp.lang.rust? cross@spitfire.i.gajendra.net (Dan Cross) - 2025-07-28 11:37 +0000
          Re: Informal discussion: comp.lang.rust? Julio Di Egidio <julio@diegidio.name> - 2025-07-28 13:50 +0200
            Re: Informal discussion: comp.lang.rust? cross@spitfire.i.gajendra.net (Dan Cross) - 2025-07-28 15:16 +0000
              Re: Informal discussion: comp.lang.rust? Julio Di Egidio <julio@diegidio.name> - 2025-07-28 17:59 +0200
                Re: Informal discussion: comp.lang.rust? cross@spitfire.i.gajendra.net (Dan Cross) - 2025-07-28 22:18 +0000
                Re: Informal discussion: comp.lang.rust? Julio Di Egidio <julio@diegidio.name> - 2025-07-29 10:18 +0200
                Re: Informal discussion: comp.lang.rust? cross@spitfire.i.gajendra.net (Dan Cross) - 2025-07-29 12:16 +0000
                Re: Informal discussion: comp.lang.rust? David Brown <david.brown@hesbynett.no> - 2025-07-29 17:37 +0200
                Re: Informal discussion: comp.lang.rust? Julio Di Egidio <julio@diegidio.name> - 2025-07-29 18:24 +0200
                Re: Informal discussion: comp.lang.rust? Julio Di Egidio <julio@diegidio.name> - 2025-07-29 19:14 +0200
                Rust vs Hype (was Re: Informal discussion: comp.lang.rust?) cross@spitfire.i.gajendra.net (Dan Cross) - 2025-07-29 18:27 +0000
                Re: Rust vs Hype (was Re: Informal discussion: comp.lang.rust?) David Brown <david.brown@hesbynett.no> - 2025-08-02 17:47 +0200
                Re: Rust vs Hype (was Re: Informal discussion: comp.lang.rust?) cross@spitfire.i.gajendra.net (Dan Cross) - 2025-08-04 22:33 +0000
                Re: Rust vs Hype (was Re: Informal discussion: comp.lang.rust?) David Brown <david.brown@hesbynett.no> - 2025-08-06 18:38 +0200
                Re: Rust vs Hype (was Re: Informal discussion: comp.lang.rust?) cross@spitfire.i.gajendra.net (Dan Cross) - 2025-08-08 03:30 +0000
                Re: Informal discussion: comp.lang.rust? Julio Di Egidio <julio@diegidio.name> - 2025-07-30 19:08 +0200
                Re: Informal discussion: comp.lang.rust? cross@spitfire.i.gajendra.net (Dan Cross) - 2025-07-30 18:00 +0000
                Re: Informal discussion: comp.lang.rust? Julio Di Egidio <julio@diegidio.name> - 2025-07-30 20:34 +0200
                Re: Informal discussion: comp.lang.rust? cross@spitfire.i.gajendra.net (Dan Cross) - 2025-07-30 18:40 +0000
                Re: Informal discussion: comp.lang.rust? Julio Di Egidio <julio@diegidio.name> - 2025-07-30 20:51 +0200
                Re: Informal discussion: comp.lang.rust? cross@spitfire.i.gajendra.net (Dan Cross) - 2025-07-30 18:53 +0000
                Re: Informal discussion: comp.lang.rust? Julio Di Egidio <julio@diegidio.name> - 2025-09-05 10:59 +0200
                Re: Informal discussion: comp.lang.rust? Julio Di Egidio <julio@diegidio.name> - 2025-08-03 17:55 +0200
                Re: Informal discussion: comp.lang.rust? Julio Di Egidio <julio@diegidio.name> - 2025-08-03 18:17 +0200
              Re: Informal discussion: comp.lang.rust? Richard Heathfield <rjh@cpax.org.uk> - 2025-07-29 06:24 +0100
                Re: Informal discussion: comp.lang.rust? cross@spitfire.i.gajendra.net (Dan Cross) - 2025-07-29 12:27 +0000
                Re: Informal discussion: comp.lang.rust? Richard Heathfield <rjh@cpax.org.uk> - 2025-07-30 07:44 +0100
                Re: Informal discussion: comp.lang.rust? cross@spitfire.i.gajendra.net (Dan Cross) - 2025-07-30 11:30 +0000
                Re: Informal discussion: comp.lang.rust? Richard Heathfield <rjh@cpax.org.uk> - 2025-07-30 16:51 +0100
                Re: Informal discussion: comp.lang.rust? cross@spitfire.i.gajendra.net (Dan Cross) - 2025-07-30 18:00 +0000
                Re: Informal discussion: comp.lang.rust? David Brown <david.brown@hesbynett.no> - 2025-08-02 18:41 +0200
                Re: Informal discussion: comp.lang.rust? cross@spitfire.i.gajendra.net (Dan Cross) - 2025-08-04 22:34 +0000
  Re: Informal discussion: comp.lang.rust? Kaz Kylheku <643-408-1753@kylheku.com> - 2025-03-10 17:35 -0400

csiph-web