← Back to context

Comment by creata

3 years ago

What lies did the Rust developers make?

(Also, "nowadays" must stretch out to many decades if you're including Java!)

The three securities they guarantee and cannot hold.

Fearless concurrency.

Java also promised memory safety. I still get Null pointer segfaults in Java code.

  • If you know of a case where rust code violates memory safety without the use of an unsafe block, file a bug and it will probably be fixed within a release or two.

    "Fearless concurrency" is more subjective, but rust code (again with the caveat that there isn't unsafe code, or unsafe cose upholds all unvariants) dows eliminate certain classes of concurrency bugs. Although, dreadlocks are definitely possible, and certain kinds of race conditions could potentially exist. But I don't know of any claims that concurrency bugs are impossible in rust.

    • do you your self a favor and search their ticket system for stack overflow. the list gets longer, not smaller.

      and looking at their compiler it's clear why. stack-allocation of vars is fine and dandy, but comparable to vlang's famous unbounded autofree system. alloca() is dangerous for a reason.

      unsafe vec, really?? mutexes in threads, really?? concurrent blocking IO in this decade??

      also read their docs about their unsafeties, and concurrency deficiencies. compare that to the docs of real safe languages. you won't find such chapters, because safe languages are safe, not just almost-safe.

      4 replies →

    • Someone pointed out an obvious one: You can open the file "/dev/mem" or equivalent on many Unix systems and break things horribly, and rust can't tell that you're doing it or stop you. Someone used this to write an unsafe-free transmute, which is probably at least two different war crimes.

      I doubt the rust team will try to "fix" that.

      2 replies →

  • You most likely get NPEs, not segfaults. I have never seen a segfault in Java and the first Java version I used was 1.5.

The marketing sentence "A language empowering everyone to build reliable and efficient software." is not true.