A D vs. Rust example

Don Allen donaldcallen at gmail.com
Wed Oct 26 14:59:02 UTC 2022


On Tuesday, 25 October 2022 at 21:38:44 UTC, Sergey wrote:
> On Tuesday, 25 October 2022 at 18:11:28 UTC, Don Allen wrote:
>> On Tuesday, 25 October 2022 at 17:37:22 UTC, Tejas wrote:
>>That's true and is essentially what I'm saying -- Rust is fine 
>>for what it was >designed for, but it is not suitable for 
>>ordinary application development. But this >is ignored by many 
>>in the Rust community and even by Mozilla, which, for example,
>>>is using Rust in Firefox
>
> But the browser not really "ordinary" application. And all 
> users will be happy if it will be as fast as possible and 
> consume not too much memory.

If you think that the user experience would be any different if 
Mozilla used Go or D for the work they are doing with Firefox, 
then you and I just need to agree to disagree.

I can re-cite my own recent experience, stated here more than 
once: I wrote a suite of personal financial management 
applications in C 10 years ago. It got ugly and hard to maintain, 
so I re-wrote much of it in Rust. When I tired of dealing with 
Rust's challenges, I turned to D. The performance of the C, Rust 
and D versions of the most processor-intensive application are 
within a few percent of each other, indistinguishable in actual 
use.

> Actually users will be happy if every app will have those 
> parameters. Instead of that we have Intellij IDEA and Electron 
> apps which are very far from being *blazingly fast*.

Electron is at least partly implemented in C++. I've tried the 
Atom editor, which is based on Electron, and it *is* annoyingly 
slow. Do you think not using Rust is their problem? Or maybe they 
got some algorithms wrong, or used badly implemented bloatware, 
or .... (a long list of how applications can be made to perform 
badly regardless of programming language).




More information about the Digitalmars-d mailing list