Earlier quoted context omitted.
what a weird take to me... C has DECADES of high quality teaching material in form of books, university courses, plenty of which is freely available with a bit of searching. And, if we discount the fact that "buying" a book is such a big hurdle, even more high quality academic text books and papers to boost; anything from embedded on the weirdest platforms, basic parsing, writing compilers, language design, high perf…
> edit2: networking, signal processing, automotive, learning about industry protocols and devices of any sort... I admit there is many great products that are written in C that aren’t going anywhere any time soon, notably SQLite, but there is no reason to write new software in C or C++.
Rust to C compiler – 95.9% test pass rate, odd platforms
191–200 of 264 posts
Re: Rust to C compiler – 95.9% test pass rate, odd platforms
#192Earlier quoted context omitted.
Very strong statement, one I don't really believe
That’s what happened to COBOL, right?
Re: Rust to C compiler – 95.9% test pass rate, odd platforms
#193Earlier quoted context omitted.
It is, but it is still tiny compared to C/C++. And many people also do not like it.
There are two categories of people who don’t like Rust: 1. C/C++ developers who are used to C/C++ and don’t want to learn Rust. 2. Go developers who claim Rust is too difficult and unreadable. Which one is you?
Re: Rust to C compiler – 95.9% test pass rate, odd platforms
#194Earlier quoted context omitted.
Right, that's why a 20 year old book on algorithms and data structures is not necessarily outdated, but a 20 year old book on C/C++ most certainly is.
My copy of The C++ Programming Language for C++98 is still useful today, as is copy of The C Programming Language for C89. The idea that these books are no longer useful is absurd. Modern compilers still support those versions and the new versions are largely extensions of the old (although C++11 changed some standard library definitions). The only way you could think this is if you have zero knowledge of these langu…
Exactly. For context see my original comment above about C/C++ books being paid.
Re: Rust to C compiler – 95.9% test pass rate, odd platforms
#195Earlier quoted context omitted.
If the transpilation itself is bug-free, why not? For static guarantees, provided we transpile Rust code that already compiles on a normal Rust compiler, the guarantees are already checked and there, and the dynamic ones such as bounds checking can be implemented runtime in C with no problems.
this assumes the rusty guarantees are transitive. There's no reason to believe it isn't, but it'd be nice to see some sort of proof, or at least an argument for it.
Re: Rust to C compiler – 95.9% test pass rate, odd platforms
#196Earlier quoted context omitted.
> Being decades old does not make it out of date. Right, the docs never get out of date if the thing they document never changes. Can you say the same about C++ though? I’ve heard they release new versions every now and then. My robotics teacher didn’t know ‘auto’ is a thing for example.
Both C and C++ release new versions. The compilers continue to support the old versions and people continue using the old versions (less so in the case of C++). Rust’s compiler drops the old version every time it has a new release. There is no `-std=1.85` in rust 1.86. You do get `-std=c++98` in both g++ and clang++. A book on C or C++ is still useful even decades later since the version of C or C++ described does no…
Given a version number MAJOR.MINOR.PATCH, increment the:
MAJOR version when you make incompatible API changes
MINOR version when you add functionality in a backward compatible manner
PATCH version when you make backward compatible bug fixes
Additional labels for pre-release and build metadata are available as extensions to the MAJOR.MINOR.PATCH format.What kind of versioning scheme does C/C++ use?
Re: Rust to C compiler – 95.9% test pass rate, odd platforms
#197Earlier quoted context omitted.
> This is very different than Rust where every new version is abandonware after 6 weeks and the compiler does not let you specify that your code is from a specific version. Do you have any specific evidence? Rust ecosystem is known for libraries that sit on crates.io for years with no updates but they are still perfectly usable (backward-compatible) and popular. Projects usually specify their MSRV (minimum supported…
https://endoflife.date/rust
Re: Rust to C compiler – 95.9% test pass rate, odd platforms
#198Earlier quoted context omitted.
>To fix bugs, sure. Maybe your program worked due to the bug they fixed.
Extremely unlikely. CPU bugs generally halt the CPU or fail to write the result or something like that. The Pentium FDIV bug where it would give a plausible but wrong result was a once in a lifetime thing.
Re: Rust to C compiler – 95.9% test pass rate, odd platforms
#199Earlier quoted context omitted.
There are two categories of people who don’t like Rust: 1. C/C++ developers who are used to C/C++ and don’t want to learn Rust. 2. Go developers who claim Rust is too difficult and unreadable. Which one is you?
I know a guy who used to love Rust and his cannot stand it. The hype wore off in his case.
Re: Rust to C compiler – 95.9% test pass rate, odd platforms
#200Earlier quoted context omitted.
what a weird take to me... C has DECADES of high quality teaching material in form of books, university courses, plenty of which is freely available with a bit of searching. And, if we discount the fact that "buying" a book is such a big hurdle, even more high quality academic text books and papers to boost; anything from embedded on the weirdest platforms, basic parsing, writing compilers, language design, high perf…
> C has DECADES of high quality teaching material in form of books, university courses, plenty of which is freely available with a bit of searching. Which means all that high quality teaching material is DECADES old. Rust development is centralised and therefore the docs are always up-to-date, unlike C/C++ which is a big big mess.
I ended up switching to Python for job requirements after getting through half the book. If I re-learn C, I'll go back to it. If it were C++, that would be a totally, different story since they kept piling features on over time.