Live data from Hacker News

Rust and C++ with Steve Klabnik and Herb Sutter [audio]

softwareengineeringdaily.com

21–30 of 59 posts

Re: Rust and C++ with Steve Klabnik and Herb Sutter [audio]

#21

Be 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,…

> 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.

Re: Rust and C++ with Steve Klabnik and Herb Sutter [audio]

#22
I'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

Re: Rust and C++ with Steve Klabnik and Herb Sutter [audio]

#23
post #18

Steve 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/ and Plum Hall 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 System…

> 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 evidenc…

This is entirely incorrect, Ferrocene manages a specification of a subset of the language here: 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/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.

(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.)

Re: Rust and C++ with Steve Klabnik and Herb Sutter [audio]

#24
post #18

Steve 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/ and Plum Hall 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 System…

> 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 evidenc…

Here the conformance refers to the Ferrocene language specification [1], which is being developed to be something akin to ISO/IEC 14882 for Rust in the future. In fact, this specification and the Ferrocene toolchain is meant to be ISO 26262 or IEC 61508 qualified, so it directly addresses your concern.

The comment posted by jamesmunns will do much better job in describing the exact details than mine (both comments happened to be posted within 20 seconds, huh), so I'll just add that standards are meaningless by their own. Quite a lot of people criticizing Rust for the lack of formal standards seem to assume that such standards will immediately improve something, but that's never true. Standards are meaningful only when they are maintained and can be enforced; many historical standards failed to catch up and fell into the oblivion for this reason. It doesn't even matter much whether the specification is written in "formal" prose [2]. I feel they are missing the fundamental reason why language standards can be beneficial in principle.

[1] https://spec.ferrocene.dev/

[2] Which is never "formal" in the mathematical sense. (Mathematically formal language specifications are quite rare, examples include SML and WebAssembly.) In fact, such formal writing is slightly better than informal writing only because such writing also aims to be unambiguous, and the formality itself is not that important.

Re: Rust and C++ with Steve Klabnik and Herb Sutter [audio]

#25

I'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…

If 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.

Re: Rust and C++ with Steve Klabnik and Herb Sutter [audio]

#26

I'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…

Learn 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.

Re: Rust and C++ with Steve Klabnik and Herb Sutter [audio]

#27

I'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…

Coding 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.

Re: Rust and C++ with Steve Klabnik and Herb Sutter [audio]

#28

I'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…

If Rust would stop the politics pushing, I wouldn't be so afraid of it

Re: Rust and C++ with Steve Klabnik and Herb Sutter [audio]

#29

Be 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,…

Not 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.
Post reply on HN