3 ms·
Types provide semantic information as well so checking verifies semantics as well (extent depends on the strength of the type system). Saying you're a Rust fan
by rubber_duck 10y ago
Types provide semantic information as well so checking verifies semantics as well (extent depends on the strength of the type system).
Saying you're a Rust fan and then saying compilers only guarantee syntax when the entire point of that language is to have a constrained subset in which types guarantee no data races/leaks at compile time doesn't make sense to me.
- bluejekyll 10y agoI didn't mean to imply that rust doesn't provide more than just syntax. You are correct that rust provides a huge number of guarantees around semantics, but honestly, I think it's not a traditional compiler, it provides a ton of features that you don't find in C compilers for example. Rust is the greatest thing since sliced bread, my comment was only about statically typed and compiled languages in general. I think you read more into my comment than I intended.
- majewsky 10y agoOf course it's a compiler. A compiler verifies that its input conforms to the syntax and semantics of its own language, and generates machine code (or some other language) equivalent to the input. The only difference is that Rust's semantics is waaayyy more strict than C's.