3 ms·
And a new language is magically going to solve all the problems you mentioned and do everything c can at the same speed?
by spacecowboy_lon 11y ago
And a new language is magically going to solve all the problems you mentioned and do everything c can at the same speed?
- jerven 11y agoNot magically, but with a lot of technical effort Rust does solve those problems and at the same speed. As in a Rust compiler will generate equivalent assembly as C in equivalent cases. With practically for now some places where Rust will win and some where C will win performance wise. But there are no practical reasons for Rust to be slower than C or C++.
- cLeEOGPw 11y agoCould you rewrite linux kernel in Rust?
- wtallis 11y agoYes. However, writing a linux-like kernel that is not 95% `unsafe` code would be a lot harder than just a straightforward syntax change of C to rust.
- kibwen 11y agoSure, but it probably wouldn't make sense to. Instead, you'd be better off doing like the Redox folks and designing your own Rust-based OS, with plans for a Linux-compatible userspace: http://www.redox-os.org/ http://www.redox-os.org/
- pjmlp 11y agoC was dog slow in its early days and there were safer systems programming languages available outside the UNIX world that were equally fast. What has gotten C compilers to generate the code quality that have nowadays is 40 years of work in compiler optimizations targeted to improve C compilers code generation.