News for hackers. Stuff that matters.
Re:Thoughts on replacement languages by krenoten on Saturday January 10, 2015 @06:00PM (#8868267)
This is so much more important than people are generally aware of. We are leaving the point in time that writing highly bug-prone C or C++ is justifiable due to performance concerns. The justifiability of these up until now is a huge reason why governments and organized crime have been able to buy the keys to our servers and personal machines. We are going to be able to replace ubiquitous, critical, buggy code with something that will significantly increase the costs of finding and exploiting RCE vulnerabilities. This is so huge.
Re:Thoughts on replacement languages by Ygg2 on Saturday January 10, 2015 @06:58PM (#8868453)
For now, I don't think Rust is as performant as C/C++. Although it should be able to match C/C++ speed, I think there are some cases where the output was slower than expected.
Re:Thoughts on replacement languages by krenoten on Saturday January 10, 2015 @07:14PM (#8868509)
You are absolutely correct. I should say that the THEORETICAL performance of Rust may be competitive with C++, maybe even faster in some cases, but that work remains to be done to get it there. My above statement assumes that this day will come, or that the performance at least reaches a point that will allow a reasonable engineer to choose Rust over C or C++ for something that performance is a crucial consideration for.
Re:Thoughts on replacement languages by brohee on Saturday January 10, 2015 @07:26PM (#8868530)
There are actually cases where Rust is faster than C already, one of the reasons being the compiler emitting better code thanks to mutable aliasing being forbidden.

http://benchmarksgame.alioth.debian.org/u64q/rust.html

Re:Thoughts on replacement languages by zzzcpan on Saturday January 10, 2015 @07:37PM (#8868555)
It's not why C is faster, it's more about being able to use hand crafted SSE2 instructions and existing libraries with such optimizations. Nothing competes with C when performance really matters.
Re:Thoughts on replacement languages by pcwalton on Saturday January 10, 2015 @08:27PM (#8868676)
You can use "hand-crafted" SSE2 instructions and libraries with the same in Rust. Servo heavily relies on Skia, for example…
Re:Thoughts on replacement languages by bjz_ on Saturday January 10, 2015 @09:44PM (#8868824)
There is also a case for making highly optimized C performance easier to attain, without needing to resort to unsafe code. You can do this by providing more invariants to the compiler via a better type system, which gives it more room to optimize. It may never get to the performance of hand-optimized stuff, but for that there is unsafe code blocks.
Re:Thoughts on replacement languages by hetman on Saturday January 10, 2015 @08:40PM (#8868701)
Technically Fortran does compete. For computational applications it is faster than C and hence why it's so popular in supercomputing.
Re:Thoughts on replacement languages by krenoten on Saturday January 10, 2015 @07:49PM (#8868586)
Feel free to use the asm! macro in rust when you need to. FFI support is also quite good.
Re:Thoughts on replacement languages by NateDad on Saturday January 10, 2015 @07:30PM (#8868537)
I think the point is that machines are fast enough that being as fast as C++ doesn't matter anymore.
Re:Thoughts on replacement languages by furyofantares on Saturday January 10, 2015 @07:52PM (#8868595)
True for many things. But there are still plenty of things that we still want to do faster or cheaper or that we want to feed more data to, and we also still find plenty of new things to do as computers get more powerful.