I think C++ is still a desirable coding platform compared to Rust
101–110 of 110 posts
Re: I think C++ is still a desirable coding platform compared to Rust
#102Earlier quoted context omitted.
I actually think Cargo & crates.io are the weakest and shittiest part of Rust right now. They're a bit amateur. But yes, CMake is something I do not miss. Though I miss the alternatives even less. Though C++ with Bazel is actually quite attractive.
So having one easy to use build system (and actual package manager) is worse than having countless arcane build systems?
Re: I think C++ is still a desirable coding platform compared to Rust
#103Earlier quoted context omitted.
there is another key difference between rust and c++, rust by default bundles its stdlib into the executable, which make each executable kind of a static binary, they add up fast. c++ uses shared libraries, smaller in size for the whole system, and, you can upgrade a library separately too. on embedded systems where storage space is restricted, rust is simply a no-go.
All embedded applications and libraries can be declared with no_std, removing the std dependency and heap allocation. Shared libraries are also possible.
Re: I think C++ is still a desirable coding platform compared to Rust
#104Earlier quoted context omitted.
glibc can be shared by 20 c executables. rust stdlib will be bundled with those 20 rust executables, they blow up quickly. mcu does not use stdlib of rust, it uses no-std, c++ has its own nonstdlib as well, on mcu they're similar.
Yes, I understand what you're saying. I am saying that if you find yourself in that situation, don't use the Rust standard library. Your Rust programs can share glibc with your C programs just fine. This isn't a disqualifying situation for Rust. Heck, when you use the Rust standard library, dynamically linking to glibc is the norm!
Re: I think C++ is still a desirable coding platform compared to Rust
#105Earlier quoted context omitted.
Yes, I understand what you're saying. I am saying that if you find yourself in that situation, don't use the Rust standard library. Your Rust programs can share glibc with your C programs just fine. This isn't a disqualifying situation for Rust. Heck, when you use the Rust standard library, dynamically linking to glibc is the norm!
maybe OP doen't know about #![no_std] !? You can not (as far as I know) have the Rust std lib as a dll, but you can chose to not use/include the std lib: https://web.mit.edu/rust-lang_v1.25/arch/amd64_ubuntu1404/sh...
Re: I think C++ is still a desirable coding platform compared to Rust
#106Earlier quoted context omitted.
Yes, I understand what you're saying. I am saying that if you find yourself in that situation, don't use the Rust standard library. Your Rust programs can share glibc with your C programs just fine. This isn't a disqualifying situation for Rust. Heck, when you use the Rust standard library, dynamically linking to glibc is the norm!
maybe OP doen't know about #![no_std] !? You can not (as far as I know) have the Rust std lib as a dll, but you can chose to not use/include the std lib: https://web.mit.edu/rust-lang_v1.25/arch/amd64_ubuntu1404/sh...
Re: I think C++ is still a desirable coding platform compared to Rust
#107Yeah, that's a no from me. I'm a full time C++ dev and every time I code in Rust it is harder for me to switch back. The author has pointed to some issues regarding performance. In the end, you can always rewrite your code to generate other/better assembly, if you really need the speed. I would argue Rust is so much more that just Rust itself. Like many others after noted, it is not only the language, but the whole e…
I started in my own time and even back then it was superior...
People like c++ for the language features... I dislike it because of all the defensive programming one must do....
Re: I think C++ is still a desirable coding platform compared to Rust
#108Yeah, that's a no from me. I'm a full time C++ dev and every time I code in Rust it is harder for me to switch back. The author has pointed to some issues regarding performance. In the end, you can always rewrite your code to generate other/better assembly, if you really need the speed. I would argue Rust is so much more that just Rust itself. Like many others after noted, it is not only the language, but the whole e…
there is another key difference between rust and c++, rust by default bundles its stdlib into the executable, which make each executable kind of a static binary, they add up fast. c++ uses shared libraries, smaller in size for the whole system, and, you can upgrade a library separately too. on embedded systems where storage space is restricted, rust is simply a no-go.
Re: I think C++ is still a desirable coding platform compared to Rust
#109There's a safe and sane language subset struggling to get out of "modern C++". The essence is following the Rule of 3/5/0, adopting value semantics, explicit ownership via unique_ptr/shared_ptr, resources wrapped as RAII objects. The syntax and feature space is certainly crowded and abused, but playing with the borrow-checker is an entirely different game.
To rework an old comment of mine: [0]
There is no subset of C++ which is both safe and practical for real use. The MISRA C++ subset isn't enough to provide solid assurance of the absence of undefined behaviour, for instance. For that, you need a full-bore formal verification system, akin to that of the SPARK Ada language.
This is in sharp contrast to Rust, where there really is a subset which is safe 'by construction' (called Safe Rust).
Re: I think C++ is still a desirable coding platform compared to Rust
#110Earlier quoted context omitted.
In C++ discipline is optional. In Rust it's mandatory.
I think this is amusing because both directions completely work: In C++, you can do whatever. Rust forces you do to some things. No discipline required by C++, absolutely required by Rust. In C++, you can do whatever. Rust forces you to do some things. This means you must have discipline in C++, or you will do bad things. But in Rust, you can do whatever you want, the compiler has your back.
I should have said that no discipline is required in C++ to obtain a binary.