gilnaa
A bit like saying trains and chairs are functionally the same since they both can have wheels; when there's the crucial difference that chairs don't go choo-choo.
It doesn't mean that the enum itself is non exhaustive: at any point in time when enum is defined, it defines all of its variants and any other value is still UB.
Safety (of all kinds) is not the only selling point of Rust and Zig, and the fact that Ada also have safety measures doesn't mean that it's instantly an option for me.
For example, I keep seeing people hype about Zig/Rust, for all kinds of reasons; and the way that they present their arguments is very compelling. While I've heard of Ada before, AFAICT the only context in which it is brought up is to downplay hype over Rust/Zig; never as a standalone.
Sounds like a PR problem, mostly.
EDIT: Not to say that there aren't other problems, just saying that this point alone isn't some magic bullet.
I don't like Rust because it gives me memory safety, tons of languages do that. I love Rust because the tradeoffs it gives me worth the switch, and the overall tooling and ecosystem are very well made.
"Allocate T bytes on stack bound as x" may sound a bit like T is a size instead of a type.
On my late 2019 MacBook Pro, using clang 12.
clang -O3 -march=native fizz4.c
./a.out | pv > /dev/null
Starts at around 4GiB/s and drops down to 3.8 after a while, probably due to battery/heating.Show HN: FizzBuzz 4GiB/S
But then I re-read your comment and realized you've meant that you can't do this in JS.
What a shame that it died.
https://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=RESOLVED...
Some organizations change compilers very slowly, and you can't assume you always have the most updated compiler.
For example, when writing a library for my org I assumed that GCC 5.4 (2016) is a reasonable lower bound, and I used the appropriate set of supported C++11 features, and twice I had to downgrade as different teams notified me they had older and older compilers. (and couldn't upgrade)
This industry seem to be comprised of morally bankrupt executives and that's a shame.
The worst part is that Tamar Zandberg, a leftist party leader, tried to get some of the companies' export license revoked, but the government flat out refused, saying that the export tax is prioritized higher than human rights violations.