Undefined Behavior in C and C++ (2024)
russellw.github.io
Undefined Behavior in C and C++ (2024)
1–10 of 234 posts
Re: Undefined Behavior in C and C++ (2024)
#2Re: Undefined Behavior in C and C++ (2024)
#3We switched to Rust. Generally, are there specific domains or applications where C/C++ remain preferable? Many exist—but are there tasks Rust fundamentally cannot handle or is a weak choice?
Re: Undefined Behavior in C and C++ (2024)
#4We switched to Rust. Generally, are there specific domains or applications where C/C++ remain preferable? Many exist—but are there tasks Rust fundamentally cannot handle or is a weak choice?
I haven't used Rust extensively so I can't make any criticism besides that I find compilation times to be slower than C
Rusts tooling is hands down better than C/++ which aids to a more streamlined and efficient development experience
Re: Undefined Behavior in C and C++ (2024)
#5We have zig, Hare, Odin, V too.
Re: Undefined Behavior in C and C++ (2024)
#6Rust 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.
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...
Re: Undefined Behavior in C and C++ (2024)
#7Re: Undefined Behavior in C and C++ (2024)
#8We switched to Rust. Generally, are there specific domains or applications where C/C++ remain preferable? Many exist—but are there tasks Rust fundamentally cannot handle or is a weak choice?
IMHO you can today deal with UB just fine in C if you want to by following best practices, and the reasons given when those are not followed would also rule out use of most other safer languages.
Re: Undefined Behavior in C and C++ (2024)
#9We switched to Rust. Generally, are there specific domains or applications where C/C++ remain preferable? Many exist—but are there tasks Rust fundamentally cannot handle or is a weak choice?
I haven't used Rust extensively so I can't make any criticism besides that I find compilation times to be slower than C
Re: Undefined Behavior in C and C++ (2024)
#10Earlier quoted context omitted.
I haven't used Rust extensively so I can't make any criticism besides that I find compilation times to be slower than C
I find with C/++ I have to compile to find warnings and errors, while with Rust I get more information automatically due to the modern type and linking systems. As a result I compile Rust significantly less times which is a massive speed increase. Rusts tooling is hands down better than C/++ which aids to a more streamlined and efficient development experience
Would you expand on this? What was your C tooling/workflow that was inferior to your new Rust experience?