Remix.run Logo
fattah25 5 days ago

Rust here rust there. We are just talking about C not rust. Why we have to using rust. If you talking memory safety why there is no one recommends Ada language instead of rust.

We have zig, Hare, Odin, V too.

ViewTrick1002 5 days ago | parent | next [-]

> Ada language instead of rust

Because it never achieved mainstream success?

And Zig for example is very much not memory safe. Which a cursory search for ”segfault” in the Bun repo quickly tells you.

https://github.com/oven-sh/bun/issues?q=is%3Aissue%20state%3...

lifthrasiir 5 days ago | parent | next [-]

More accurately speaking, Zig helps spatial memory safety (e.g. out-of-bound access) but doesn't help temporal memory safety (e.g. use-after-free) which Rust excels at.

pjmlp 4 days ago | parent | next [-]

Which is something that even PL/I predating C already had.

ViewTrick1002 4 days ago | parent | prev [-]

As long as you are using the "releasesafe" build mode and not "releasefast" or "releasesmall".

johnisgood 4 days ago | parent | prev [-]

> Because it never achieved mainstream success?

And with this attitude it never will. With Rust's hype, it would.

pjmlp 4 days ago | parent | prev | next [-]

None of them solve use after free, for example.

Ada would rather be a nice choice, but most hackers love their curly brackets.

the__alchemist 4 days ago | parent | prev [-]

Even within the rust OSS community it's irritating. They will try to cancel people for writing libs using `unsafe`, and makes APIs difficult to use by wrapping things in multiple layers of traits, then claim using other patters are unsafe/unsound/UB. They make claims that things like DMA are "advanced topics", and "We haven't figured it out yet/found a good solution yet". Love rust/hate the Satefy Inquisition. Or say things like "Why use rust if you don't use all the safety-features and traits"... which belittles rust as a one-trick lang!