Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
I'm going to come out and say it too.
You're not doing anything interesting then. -
Rust is not meant as replacement for higher level languages, but aims squarely at C++. Means, if you havn't been using C++ until now, then Rust won't be your best bet anyway.
-
@Fast-Nop I thought the point of zero cost abstractions and macros were to make it more comparable to languages like C# without the overhead of the runtime.
-
@ThisIsOra If that had been important in such C# projects, they would instead have been in C++ which offers these features already.
After all, the cost is only zero in terms of code size and performance, but development cost is another aspect. Manual resource management can perform better or may even be necessary for low-level programming, but doesn't come for free in terms of money because someone has to implement that.
Where Rust is trying to help is with a lot more strict compile time checks for correctness like memory safety or memory leaks. That can go wrong in C++, but the language definition doesn't allow such struct compile time checks. The developer hence needs to debug that manually, or even worse, may end up with security bugs in the final product. -
@Fast-Nop I guess I was confused by the attitude some of the Rust community shows. This thing I found on Hacker News is a good example I think...
https://leerob.io/blog/rust -
@ThisIsOra The Rust community is pretty enthusiastic about Rust, that's right. The exciting part is that Rust actually tries to bring something new to the table.
However, they also tend to hand-wave Rust problems away. Like having no ISO standard, making Rust basically "whatever the only Rust compiler just happens to do".
For that article, I think it has some merit because the major selling point of JS is running on all devices that have a browser. However, I'm not fully convinced that JS outside of this context has ever been a good idea. There's no compelling reason why e.g. these build tools for JS should be written in JS.
If (if!) both maximum performance and memory safety are key objectives for these tools, then Rust is a logical option. Then again, I'd question the performance objective. I mean, why is e.g. NPM downloading gigabytes of JS garbage from all over the internet in the first place?
Related Rants
I'm just going to come out and say it.
I have enough CPU/RAM to spare that any benefit I could get over using Rust instead of a higher level language is far outweighed by how ugly the syntax is.
rant
memory safety
rust
performance
syntax