5 ms·
" Yes, it is my fault for not being smart enough to parse the language’s syntax, but also, I do have other things to do with my life, like build hardware." and
by StillBored 4y ago
" Yes, it is my fault for not being smart enough to parse the language’s syntax, but also, I do have other things to do with my life, like build hardware."
and
"Rust Is Powerful, but It Is Not Simple"
among all the other points, should be enough to disqualify it for mainstream use. The core of most arguments against C++ boil down to those two points too. If a large percentage of the engineers working in the language have a problem understanding it, they are going to have a hard time proving that their aren't any unexpected side effects. Of which both C++ and rust seems to be full of, given the recent bug reports in rust and projects people are using it in.
So, I'm still firmly in the camp that while there are better system programming languages than C, rust isn't one of them (hell even Pascal is probably better, at least it has length checked strings).
- IshKebab 4y ago> The core of most arguments against C++ boil down to those two points too. If a large percentage of the engineers working in the language have a problem understanding it, they are going to have a hard time proving that their aren't any unexpected side effects. That's true for C++ but not for Rust, because Rust will tell you if there's some kind of unexpected behaviour that you didn't think about, whereas C++ will allow UB or whatever without telling you. That's the big difference between (safe) Rust's complexity and C++'s complexity. They are both very complex, but in Rust it doesn't matter too much if you don't memorise the complexity (complicated lifetime rules, etc.) because it will just result in a compile error. Whereas in C++ you have to remember the rule of 3... no 5... etc. (that's a really simple example; don't think "I know the rule of 5; C++ is easy!").
- pjmlp 4y agoNot in unsafe code blocks, and plenty of people reach to them, even for stuff they shouldn't, like fake dependent types in Rust.
- lawn 4y agoC++ is one of the most used languages, and it does seem to me that Rust has enough momentum going for it to be a commonly used system programming language as well. I do agree with his points, but I don't think it's enough to disqualify it for mainstream use.
- sophacles 4y agoIn that case we need to disqualify: Linux, threading, networking, anything graphical, anything involving a database, anything that has the ability to write memory that is read by other lines of code, and probably any computer that allows input and/or output just to be safe.
- StillBored 4y agoI guess my point isn't really clear. Its more a case, of your just swapping one set of problems for another. People shouldn't avoid hard problems, but they should be seeking to solve them with better tools, not ones that just translate the problem domain without providing a clear advantage. In the grand scheme your looking for the optimal intersection of simple/expressive/performant/safe and rust seems to fail on the simple/expressive axis vs just simple C which people chose over languages like C++ which are more expressive because that expressiveness is a source of bugs. And on the safety side, rust fails miserably when compared with more fully managed environments. So, it becomes a question of whether that additional cost provides much vs just spending more putting guardrails around C/C++/etc with more formal methods/verifiers.
- avgcorrection 4y ago> a question of whether that additional cost provides much vs just spending more putting guardrails around C/C++/etc with more formal methods/verifiers. So the conclusion (or the closest you get to proposing an alternative strategy) is to just to pour more tens of millions down the black hole called Cartographing The Wild West of Pointers. Hardly pragmatic.
- athrowaway3z 4y ago> And on the safety side, rust fails miserably when compared with more fully managed environments. That's a rather extreme, unsubstantiated, and imo false, claim to just throw out there as a matter of fact. And I'd also be curious how you can square putting enough formal methods/verifiers around C/C++ without creating a far worse entry into the simple/expressive axis than rust.
- masklinn 4y ago> The core of most arguments against C++ boil down to those two points too. No, the core arguments against C++ boil down to it not providing enough value for these costs, and that its complexities are not orthogonal and interact sub-optimally with one another so the complexities compound superlinearly.
- StillBored 4y agoWhich completely misses how people use C++ as a systems programming language. For the most part those users treat it like a better C, only reaching for C++ features when its an overwhelming advantage over C and generally banning significant parts of the language. See arudino for one example.
- avgcorrection 4y agoYou’ve painted yourself in a corner considering your argument against Rust was its complexity.
- Animats 4y agoThe basic problem with C++ is that it has hiding without memory safety. C has neither hiding nor memory safety. Most newer languages have both. C++ stands alone as a widely used language with high level unsafe abstractions. This is the source of most buffer overflow security advisories.
- klysm 4y ago> among all the other points, should be enough to disqualify it for mainstream use. The core of most arguments against C++ boil down to those two points too. Nope not at all, that’s not a valid comparison. I argue that there is no simple solution that affords what rust does. Engineers have to use their heads to write correct and fast software. I’m so tired of people just accepting lack of memory safety because it’s “hard” to do correctly. There are real consequences to the amount of insecure trash that exists because of this mindset.