3 ms·
> easier to use nor embed "Easy" has no objective definition. Does it mean "getting code to run"? Or does it mean "writing bug-free code"? For me, easy means
by smt88 9y ago
> easier to use nor embed
"Easy" has no objective definition. Does it mean "getting code to run"? Or does it mean "writing bug-free code"?
For me, easy means the latter. It means that human error is harder to introduce into the code. A great language should not rely on the shaky pillars of discipline or expertise, because neither of those are easy to find or enforce, nor are they consistent. A disciplined expert might be too sleepy to write safe code, for example.
Rust is much easier to use than C and C++ because the compiler helps you so much and replaces discipline/expertise. That's the whole point. Rust prevents you from doing something you don't intend to do (or at least it does it better than most languages).
Python, Ruby, and Clojure don't have the same guarantees, and none of them can be used without garbage collection, making them unsuitable for a variety of cases where Rust can be used.
- AstralStorm 9y agoCompiler does not help you. It is not a proof suggestion system like Isabelle/HOL or the like. In fact error messages rust produces rival the terrible nature of ones in older C++ compilers thus far. The compiler only prevents you from making mistakes. Intentions do not even enter into it. See, some of the performance critical code in our apps has to work around even the lax C++11 rules. It is completely impossible in rust without using unsafe stuff liberally - specifically gets about 1000x slower and this matters a lot. Compilers know nothing about intentions, nor can a borrow checker enforce intentions unlike a type system.
- burntsushi 9y ago> Compiler does not help you. It is not a proof suggestion system like Isabelle/HOL or the like This seems like a gratuitous misrepresentation. A compiler does not need a proof suggestion system to help you. > In fact error messages rust produces rival the terrible nature of ones in older C++ compilers thus far. No, it doesn't. The error messages are wonderful and constantly improving. > It is completely impossible in rust without using unsafe stuff liberally - specifically gets about 1000x slower and this matters a lot. Can you give specific concrete examples?