Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: David Brown Newsgroups: comp.arch Subject: Re: Computer architects leaving Intel... Date: Sun, 15 Sep 2024 17:53:32 +0200 Organization: A noiseless patient Spider Lines: 56 Message-ID: References: <2024Aug30.161204@mips.complang.tuwien.ac.at> <2024Aug30.195831@mips.complang.tuwien.ac.at> <2024Aug31.170347@mips.complang.tuwien.ac.at> <505954890d8461c1f4082b1beecd453c@www.novabbs.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Sun, 15 Sep 2024 17:53:33 +0200 (CEST) Injection-Info: dont-email.me; posting-host="0f814bd11c9fbe5b78942ec153f06f57"; logging-data="2364930"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+Orys/MjXdxqxglj2Ec270etrgM4ylpxI=" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:eK49rx5ohLHL9ISM3MyUYr0Gs8c= In-Reply-To: Content-Language: en-GB Bytes: 3849 On 13/09/2024 22:09, Stephen Fuld wrote: > On 9/3/2024 4:14 PM, David Brown wrote: >> On 03/09/2024 18:54, Stephen Fuld wrote: >>> On 9/2/2024 11:23 PM, David Brown wrote: >>>> On 02/09/2024 18:46, Stephen Fuld wrote: >>>>> On 9/2/2024 1:23 AM, Terje Mathisen wrote: >> >>>>>> Anyway, that is all mostly moot since I'm using Rust for this kind >>>>>> of programming now. :-) >>>>> >>>>> Can you talk about the advantages and disadvantages of Rust versus C? >>>>> >>>> >>>> And also for Rust versus C++ ? >>> >>> I asked about C versus Rust as Terje explicitly mentioned those two >>> languages, but you make a good point in general. >>> >> >> I want to know about both :-) >> >> In my field, small-systems embedded development, C has been dominant >> for a long time, but C++ use is increasing.  Most of my new stuff in >> recent times has been C++.  There are some in the field who are trying >> out Rust, so I need to look into it myself - either because it is a >> better choice than C++, or because customers might want it. >> >> >>> >>>> My impression - based on hearsay for Rust as I have no experience - >>>> is that the key point of Rust is memory "safety".  I use >>>> scare-quotes here, since it is simply about correct use of dynamic >>>> memory and buffers. >>> >>> I agree that memory safety is the key point, although I gather that >>> it has other features that many programmers like. >>> >> >> Sure.  There are certainly plenty of things that I think are a better >> idea in a modern programming language and that make it a good step up >> compared to C.  My key interest is in comparison to C++ - it is a step >> up in some ways, a step down in others, and a step sideways in many >> features.  But is it overall up or down, for /my/ uses? >> >> Examples of things that I think are good in Rust are making variables >> immutable by default and pattern matching.  Steps down include lack of >> function overloading > > Rust's generic functions are not sufficient? > I don't know Rust well enough to say for sure, but certainly in C++ a generic function (a template function) and an overloaded function are completely different things.