News for hackers. Stuff that matters.
Re:Rust 1.17 by dronemallone on Thursday April 27, 2017 @11:51PM (#14216756)
I did not mention compilers in my comment. Do you mean that if I use LLVM compile a C program then I get the same assurances as when I compile a Rust program?
Re:Rust 1.17 by Manishearth on Friday April 28, 2017 @02:55AM (#14217391)
LLVM doesnt speak C, it is an optimization and codegen layer. Both rustc and clang output to LLVM.

Rust's main benefit is in the compiler itself, not optimization and codegen.

Re:Rust 1.17 by proyb2 on Friday April 28, 2017 @12:32AM (#14216873)
LLVM is a compiler construction, not a compiler.

If I understand, no languages offer the same assurances, I remember GodBolt is a nice way to explore how it's compile to assembly code you can compare.

https://rust.godbolt.org https://gcc.godbolt.org https://go.godbolt.org

Re:Rust 1.17 by whytaka on Friday April 28, 2017 @05:14PM (#14223099)
Help me out. What is compiler construction?
Re:Rust 1.17 by tmccrmck on Friday April 28, 2017 @09:00PM (#14224366)
Most compilers can be broken up into two steps, which is what we call a front end and back end. [1] The front end of a compiler does syntactical (parsing + lexing) and semantic analysis (type checking, etc). The back end of a compiler takes in an intermediate representation of the code, performs optimizations, and emits the assembly language for a target CPU. Clang is an example of a front end and LLVM is the back end for Clang. Clang and rustc both share LLVM as a back end, meaning they both emit LLVM IR.

[1] Many compilers have much more than two stages. For example, Rust has another intermediate representation called MIR.

Re:Rust 1.17 by whytaka on Saturday April 29, 2017 @10:21PM (#14229872)
Many thanks, kind stranger.