7 ms·
Rust and C++ with Steve Klabnik and Herb Sutter [audio]
- sylware 2y ago[flagged]
- randomNumber7 2y agoMaybe you are just not intelligent enough to understand it.
- OtomotO 2y agoI am sorry, but your comment is propaganda too :)
- pyrale 2y ago> I am sorry, but this is propaganda: rust and c++ are the same evil: computer languages with an obscene syntax complexity. All computer languages are bad, but not all are bad equally, or for the same reasons. That's a fine point you're making.
- sylware 2y agoExactly. The metrics here, which seems to be alien to many real people or AI bots here, is that the syntax complexity is directly correlated to the difficulty to write an alternative _real life_ compiler of such language (not to mention the other issues...) The thing with c++,rust and similar syntaxes, is they are at an absurd and grotesque scale in complexity compared to, for instance, C99 syntax with some bits from c11+ for modern architecture programming (dodging all the ISO tantrums like _generic, typeof, asset on steroid, etc). Yes those words are fair, and not aknowledging them, or trying to dodge this reality, is bluntly hypocrit or you are the victim here, brain-washed, and I advise you to take a deep breath and reflect on that matter in order to get a better perspective. Do I say C99 + bits of c11+ is "BETTER", certainly not, I am just saying this is a less worse compromise. And its syntax is already waaaaay too complex and should be simplified already... then c++, rust and similar, owww! There is no argument or questioning here, only aknowledgement of a disturbing absolute truth and fair critism. And if fair critism means bad karma here, the problem is not with me, but with the karma.
- nicce 2y ago> The thing with c++,rust and similar syntaxes, is they are at an absurd and grotesque scale in complexity compared to, for instance, C99 syntax with some bits from c11+ for modern architecture programming (dodging all the ISO tantrums like _generic, typeof, asset on steroid, etc). The syntax is a tradeoff, almost always. For example, without the lifetime type in Rust, compiler cannot identify even in theory, what is the intended lifetime of that specific type and it cannot guarantee that use-after-free will not happen.
- pyrale 2y ago> they are at an absurd and grotesque scale in complexity I'm sure you can understand, though, that other people will prioritize different factors in the pros/cons of each language. For instance, as a dev that's well versed in type systems but with little experience of handling memory, Rust is basically golden compared to C or C++, because I can write code without fear, knowing that all of the discipline C/C++ devs is baked in a type system I'm used to. > I am just saying this is a less worse compromise In that sense, when comparing languages with different tradeoffs, people in different contexts will make different choices. A compromise is necessarily context-bound, and saying which compromise you promote is just another way to talk about your own context.
- sylware 2y agoExactly, and my point is critism of those tradeoffs by shining light on some of their "cosmical scale"(the word is fair) costs... somehow completely ignored in this articles of this type... how convenient... People are not equal in experience and knowledge, and it is very important to ring a different bell here to give them a significant other perspective which will impact their own choices... those very choices which other people will have to suffer if it happens they code critical open source software...
- AnimalMuppet 2y ago> which seems to be alien to many real people or AI bots here Take personal attacks somewhere else. They're against the site rules here. >Yes those words are fair, and not aknowledging them, or trying to dodge this reality, is bluntly hypocrit or you are the victim here, brain-washed, and I advise you to take a deep breath and reflect on that matter in order to get a better perspective. I have to see it your way, or I'm either brain-washed or a hypocrite? > There is no argument or questioning here, only aknowledgement of a disturbing absolute truth and fair critism. There's no questioning, only absolute truth? The world is more complicated than you think, with more trade-offs and less black and white. You need to take a deep breath and get a better perspective.
- nasso_dev 2y agohave you considered that perhaps you're not the target? perhaps your problems are just better solved with different languages and that's okay?
- cjfd 2y agoI think C++ and Rust are just fine. What you call verbosity is actually essential information that some other languages are missing and by doing so, force terrible inefficiency upon the user.
- high_na_euv 2y ago>Ofc, the guy pushing rust in the kernel was from msft... obvious flashing red sign. How? Just dont reply with EEE
- cylemons 2y agoEEE
- deleted 2y ago[deleted]
- ost-ing 2y agoRust isn't complex, low level and systems level concepts are complicated. Rust does a fantastic job at exposing you to the lower level with a very articulate syntax and philosophy of how to handle things in a fast and safe way.
- faglog 2y ago> Ofc, the guy pushing rust in the kernel was from msft... obvious flashing red sign. Rust is already in the Windows kernel for the code behind some syscalls, and there's a kernel driver framework for Rust. It's proven work that's already shipped to hundreds of millions of devices. Not sure what you're complaining about tbh.
- mcqueenjordan 2y agoTranscript link here if you prefer text: http://softwareengineeringdaily.com/wp-content/uploads/2024/10/SED1756-Rust-vs-Cpp.txt http://softwareengineeringdaily.com/wp-content/uploads/2024/...
- tialaramex 2y agoNote that although this is a really good transcript (remember that awful auto-generated transcript for an interview (podcast maybe? I don't recall all the details) with tptacek way back? Not like that) it isn't actually written by a Rust or C++ programmer (or if it was they aren't paying attention) so e.g. it says "mute" because that's how you pronounce the keyword "mut" in Rust, just as C++ people often pronounce their "char" keyword "car".
- lifthrasiir 2y agoThat does seem to be also auto-generated; "Graden" instead of Graydon, "Rust Go-ish" without a comma, "Steve, of adding" with an excess "of" etc. I would say it is very good nonetheless, but those errors don't really feel humane.
- tialaramex 2y agoSteve is too modest about the tests by the way. Lots of the conformance testing for Rust's compiler happens automatically. Herb mentions Perennial https://www.peren.com/ https://www.peren.com/ and Plum Hall https://plumhall.com/ https://plumhall.com/ for C++ and Steve says "I'm not saying that functions as a conformance test suite" when it comes to Rust's own compiler tests. But, while the Rust project itself does not perform conformance testing, Ferrous Systems does and so yeah, analogous conformance test suites exist and are run automatically. So when Herb says "And in Rust's case, that's going to need to be built out" if the interview was taking place five years ago that's an important point. But it wasn't five years ago, it was only a few weeks ago.
- myworkinisgood 2y agoC++ leadership are blinded by their own success and have no information of outside world.
- bregma 2y ago> analogous conformance test suites exist and are run automatically I'm not clear on how this is even possible. "Conformance" for C++ means adherence to the published ISO/IEC 14882 standard. In the case of Rust, it's "this is what the compiler does this week". Sure, a third party has built out a CI system for Rust and uses it provide evidence that Rust does what Rust does, but that's nothing similar to having evidence any random toolchain conforms to an accepted, published, international standard of what the C++ language does. When it comes to providing test evidence for functional safety (for example ISO 26262 or IEC 61508) I can point to Perennial or Sold Sands results and say with confidence that my toolchain does what it says on the C++ box. When it comes to Rust, I can point to Ferrous and say "the core Rust language when built using rustc does what the rustc developers claimed it should do last week, excluding any crates or libraries." To which claim are you going to trust the lives of you and your loved ones? They aren't analogous at all. There is just reams of marketing spin here and eventually it's going to kill someone.
- jamesmunns 2y agoThis is entirely incorrect, Ferrocene manages a specification of a subset of the language here: https://public-docs.ferrocene.dev/main/specification/index.html https://public-docs.ferrocene.dev/main/specification/index.h..., including things like a traceability matrix that links the specification to the implementation and the verification: https://public-docs.ferrocene.dev/main/qualification/traceability-matrix.html https://public-docs.ferrocene.dev/main/qualification/traceab... For each release of Ferrocene, this is kept up to date, and the same as C or C++, what is specified and stable can be relied upon, and implementation details are implementation details, the same as it would be if you switched from LLVM w/ SolidSands' SuperTest suite to IAR or GreenHills' toolchains which may have varying impl details but still maintain conformance with the specification. The majority of safety critical teams will snapshot a single toolchain for the entire development lifecycle (sometimes updating if necessary, very rarely), but Ferrocene is releasing updates that are approaching the full Rust cadence (IIRC they've discussed going to every other release, so once every 12 weeks vs Rust's 6 week cadence), with all of the verification required to ensure the specification is still complete, and all tests are passing. There's still work to specify and test more/all of the core/alloc/std library components, as well as third party crates, but from a toolchain perspective, it is much closer than you are giving them credit for. Unlike many proprietary C/C++ toolchains or verification suites, the majority of safety justification artifacts are publicly browseable here: https://public-docs.ferrocene.dev/main/index.html https://public-docs.ferrocene.dev/main/index.html. (I am a former founder of Ferrous Systems, and one of the people that pushed for the Ferrocene project to happen, but haven't worked there for a couple years and have no monetary stake in them anymore - I think they are just still doing the right thing, and doing it well.)
- diimdeep 2y agoBe aware that this is Microsoft/FAANG camp echo chamberly discussion lacking self criticism, very shallow and "safe" (pun intended) chain of though that sums up to basically here we are maintaining stuff for Microsoft, only mentioning c++ and rust, C# and Carbon. In similar vein, just so happens that yesterday I listened to discussion to folks outside of bigtech camp and it was much more insightful and introspective, although it is with creator of Zig and Odin language themselves instead of mere evangelists and methodologist book sellers. "Boundaries of Language Design" with Andrew Kelley & Ginger Bill [1] https://www.youtube.com/watch?v=3K8znjWN_Ig https://www.youtube.com/watch?v=3K8znjWN_Ig
- nicce 2y ago> with creator of Zig and Odin language themselves instead of mere evangelists and methodologist book sellers. To be fair, creators are the Jesus Christ in the context of evangelists. There is a strong belief why they created the language.
- lifthrasiir 2y agoNot necessarily because they are in an echo chamber, but both languages are much younger than C++, C# and Rust. (I don't think Carbon even has a significant footprint to be mentioned by now.) I appreciate both languages but they have much long road to go, including the initial "production" version which Rust reached a decade ago.
- wild_pointer 2y agoExpected a safety fight. The talk didn't deliver :(
- steveklabnik 2y agoI don’t want to have a fight, but this was recorded a few weeks before the safety thing became a big issue in the C++ world again, so that’s why it didn’t come up.
- wild_pointer 2y agoYes, I get it, fighting isn't safe
- shikaan 2y agoI feel this podcast was the first time Rust was sold to me in a way I would buy it, and it was done by the C++ party of this conversation
- joaquincabezas 2y agoI've been a long time considering that I should learn Rust. I am using Python as main language (for Machine Learning tasks) so I am at the edge: Go with: C++, because I used to code in C (for embedded, 8-bit microcontrollers) when I was younger and also for its possible advantage for learning some CUDA (this last thing is mostly for fun) or Rust, because I have some trauma for kernel panics with bad memory management back in the days with C, and because I want to build some tooling in a nice, efficient way
- pryelluw 2y agoIf you would have just learned it in the time you’ve spent considering learning it then you would not need to decide. Go download the rust book or lessons in the terminal. They’re great resources.
- creata 2y agoLearn both. Rust first, because it's a lot more approachable. Modern C++ doesn't really have much in common with C to be honest. Also, you'd probably have found these quickly, but cppreference.com is the nicest C++ reference (!cppref on DuckDuckGo) and doc.rust-lang.org (!rust on DuckDuckGo) has the Rust standard library documentation.
- joaquincabezas 2y agoIn some way I am stuck because I don't want to dismiss any of these (kind of Buridan's donkey) but planning this in a sequential way seems smart and would end the inner monologue
- jb1991 2y agoCoding in C++ is very different than it is for C and you should not consider them similar in any way. They are now two very different languages and nearly all the idioms in common use in C are considered bad practice in C++. It has been many years since these two languages could be considered similar.
- 2y ago
- deleted 2y ago[deleted]