Why Rust for safe systems programming?

IGotD- nise at nise.com
Wed Jul 24 07:54:54 UTC 2019


On Wednesday, 24 July 2019 at 03:45:45 UTC, zoujiaqing wrote:
> Why Rust for safe systems programming:
> https://msrc-blog.microsoft.com/2019/07/22/why-rust-for-safe-systems-programming/
>
> Can DLang be disabled for GC, or is it necessary to disable it? 
> Of course, many people do not like betterC.

"Rust provides the performance and control needed to write 
low-level systems, while empowering software developers to write 
robust, secure programs."

I have tried to write low level programming with Rust and this is 
the part where Rust is absolutely awful. Rust is fine for 
application programming in an existing OS but for low level stuff 
it is a dead end.

Low level programming, system programming, OS programming or 
whatever you want to call often requires another way of 
programming. Intrusive algorithms are common in order reduce 
memory fragmentation. Pointer tricks are common. Look at Linux, 
loads of pointers pointing around to different structures, often 
in a circular manner. Here Rust will be totally lost. You can do 
raw pointer programming with Rust but then the borrow checker is 
out of commission and you have to manually track the memory, then 
the point of Rust is pretty much gone.

I tried to write a few algorithms in Rust that I usually use in 
embedded system. It was incredible difficult, even more difficult 
and less verbose than C++. I gave up on Rust. I tried the same 
algorithms in D and it was very easy in comparison, even more 
easy than C++ and I'm not even good D programming.

I don't really care about the memory management in Rust, as 
memory management is very specialized in embedded systems anyway. 
What is for me much more important are the bounds checking.



More information about the Digitalmars-d mailing list