66
you are viewing a single comment's thread
view the rest of the comments
[-] FizzyOrange@programming.dev 27 points 3 days ago

It's not because we have tested this program extensively on every C++ compiler, but because the language rules of C++ say so.

Debatable. Saying things in a prose specification doesn't magically make them happen. Tests and reference models can though.

I also don't really agree with the SIL requirements that languages need to have rigorous specifications to be safe. Clearly it's better if they do, but would your rather fly on a rocket controlled by C code or Rust code?

IMO a specification would be really nice to have, but it main purpose is to tick a certification checkbox, which is why the only one that exists was written specifically for that purpose.

[-] copacetic@discuss.tchncs.de 13 points 2 days ago

The specification does not make anything happen but it enables you to say "the implementation is wrong". Of course, you can say that without a spec as well but what does "wrong" mean then? It just means you personally disagree with its behavior. When "wrong" means "inconsistent with the spec" everybody involved can work with more clarity and fewer assumptions. Wrong assumptions can kill people flying rockets.

[-] BatmanAoD@programming.dev 2 points 1 day ago

You can say the Rust implementation is wrong if it doesn't conform to the Reference. That is not the same as "you personally disagree with the behavior."

Rust's guarantees about the behavior of safe code are far stronger than anything C or C++ provides, with or without a formal spec.

load more comments (6 replies)
load more comments (9 replies)
this post was submitted on 12 Nov 2024
66 points (94.6% liked)

Rust

5989 readers
26 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