Comment by j-krieger

1 year ago

> Claims to be "safe" but allows arbitrary unsafe code, and it's everywhere.

Sigh. This is not true. Not the first part, and especially not the last part. `Unsafe` doesn't allow arbitrary, unsafe code. It resets the compiler to a level where most manually managed languages are all the time. You still have to uphold all guarantees the compiler provides, just manually. That's why Miri exists.

Either it's safe or it's unsafe. If you use the keyword "unsafe" it should definitely not mean "safe" (and it doesn't, but you seem to suggest it).

  • You're being obtuse. Terms have contexts. It is unsafe in the sense that C++ is unsafe, in that you may cause undefined behavior which can't be entirely checked by the compiler. You're back to what Valgrind/C++ -wall/UBSan provide.

    "Unchecked" or "Unconfirmed" would've perhaps been better choices, but Rust considers all other manual memory and reference management unsafe, so the word stuck.

    • I'm not being obtuse at all, I'm using the term exactly in the same way as you use it. By the way, the fact that Rust allows unsafe code by itself is not a problem. Although there are fully memory safe languages, many good languages allow unsafe code. Ada also allows unsafe constructions via pragmas. The problem is that, much unlike Ada programmers, Rust programmers use unsafe code extensively. That's the whole point. It's everywhere.

      5 replies →

  • you said you use Ada, if you use it, you should know that Ada is fundamentally unsafe language with a safe subset called spark.

    It could not verify dynamic allocations thats why it has such a huge toolset for working with static allocations.

    Frama-C allows you to program in a safe subset of the unsafe language called C.

    And these languages are the backbone of everything where lives are at risk. YOu can have a language that allows both unsafe and safe.

    Safety is not binary and our trains run C/C++ [BOTH UNSAFE LANGUAGES]

  • I think you're intentionally misreading everything people are saying to you.

    • It's really just you and another Rust fan, there's no need to further discuss this among the three of us. I think I've made it extensively clear - based on the above reasons - that I believe it's a horrible programming language and people using it now will regret it in 10 years or so.

      10 replies →