Re:Which language has the brightest future for replacing C: ...
by spacecowboy_lon on Wednesday November 11, 2015 @04:57AM
(#10545771)
And a new language is magically going to solve all the problems you mentioned and do everything c can at the same speed?
[ Parent
| on HN ]
Re:Which language has the brightest future for replacing C: ...
by jerven on Wednesday November 11, 2015 @05:03AM
(#10545796)
Not 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++.
Re:Which language has the brightest future for replacing C: ...
by cLeEOGPw on Wednesday November 11, 2015 @05:40AM
(#10545903)
Could you rewrite linux kernel in Rust?
Re:Which language has the brightest future for replacing C: ...
by kibwen on Wednesday November 11, 2015 @06:18AM
(#10546032)
Sure, 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/
Re:Which language has the brightest future for replacing C: ...
by wtallis on Wednesday November 11, 2015 @06:14AM
(#10546020)
Yes. 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.
Re:Which language has the brightest future for replacing C: ...
by pjmlp on Wednesday November 11, 2015 @05:57AM
(#10545969)
C 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.