this post was submitted on 24 Dec 2023
0 points (NaN% liked)

Rust

5974 readers
65 users here now

Welcome to the Rust community! This is a place to discuss about the Rust programming language.

Wormhole

!performance@programming.dev

Credits

  • The icon is a modified version of the official rust logo (changing the colors to a gradient and black background)

founded 1 year ago
MODERATORS
top 6 comments
sorted by: hot top controversial new old
[–] SorteKanin@feddit.dk 0 points 10 months ago (1 children)

How do you succinctly call a language that has all behavior defined or equivalently no undefined behavior (aside from designated regions)? "Memory safety" is nice since it's concise. Is there another term? Maybe just a "safe" language?

[–] sugar_in_your_tea@sh.itjust.works 0 points 10 months ago (1 children)

Wouldn't that language be called "sound"? A "sound" language would guarantee no errors or surprises in types, memory access, or statement execution. It would need to be qualified though since it didn't guarantee programs are sound (that implies error free), it only guarantees use of the language is sound.

"Safe" language also works, and is probably more understandable by the nontechnical decision makers, though it also needs a qualifier to understand what that means.

"Memory safe" is clear and explains one of the huge areas that it excels at. I would prefer "zero cost memory safety" myself, since that sets it apart from other memory safe languages that have extra costs (e.g. runtime checks). "Zero cost safety" is also fine, though I'd want an asterisk that clarifies what it applies to: memory, typing, and statement execution safety.

[–] anlumo@feddit.de 0 points 10 months ago

It’s not zero cost though, Rust adds a lot of bounds checks to keep it safe. That’s why there is stuff like .get_unchecked which makes it unsafe.

[–] ferralcat@monyet.cc 0 points 10 months ago (1 children)

Ive never gotten to write rust professionally, but I have always kinda winder d if it was marketed wrong. My thought was always that it should be sold as "easy" though. Its easy to write code. It's hard(er) to make mistakes.

I kinda figure there's a bunch of systems programmers with their heads up their asses who would never be caught dead writing in an "easy" language though, so it couldn't go that way.

(I got bored and started skimming halfway though this article, but it's neat to hear about up and coming languages I'll never use at the end)

[–] lysdexic@programming.dev 0 points 10 months ago (1 children)

Ive never gotten to write rust professionally, but I have always kinda winder d if it was marketed wrong. My thought was always that it should be sold as “easy” though. Its easy to write code. It’s hard(er) to make mistakes.

I agree, but I don't think the problem is marketing. The problem is how some elements of Rust's community desperately try to upsell the language beyond the value it actually can provide, and once that fails they fall back to toxic behavior and basically just mindlessly shitting on anything that's not Rust. It goes well beyond a cargo cult mentality, and it's sad that a fine technology is dragged through the mud by those who were expected to show its value.

[–] Iapar@feddit.de 0 points 10 months ago

Which value does it provide?