Live data from Hacker News

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

softwareengineeringdaily.com

31–40 of 59 posts

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

#31

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

Rust, the language can not push any politics. For me, technical stuff and politics are disjoint sets. I do not care at the least what the political leanings of people I work with are. To me it sounds as none of my business as what car they drive or what perfumes they like.

What exactly are you afraid of?

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

#33
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…

Conformance is meaningless so long as the spec contains the words "undefined behavior" anywhere.

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

#34
post #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.

In 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

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

#35
post #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.

Exactly this. I've felt it while checking some C++ OSS projects, thinking "wow I am more Java than this, and I don't do Java". This prevented me directly jumping into C++ which would be the natural step coming from C (because in reality it's not the natural step)

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

#36

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 learn C++ I'd suggest to use it as a nicer C, without any std:: or the million other complications. Write your own List / String classes for fun, they can't be much worse than the std ones.

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

#37
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…

"What it says on the C++ box" is indeed enough for (parts of) 26262

And that's a problem, because what it says is vague and not very helpful for the problem we actually wanted to solve. It's enough by fiat - the people responsible for 26262 wanted to be allowed to write C++, so the bar has to be low enough to be cleared by C++. This problem grows in magnitude as the software in a safety of life critical system grows.

To be clear: I don't think either of these general purpose programming languages is appropriate for use in safety of life applications. I think a provably correct program ought to be table stakes - But, a bar set low enough that you can write C++ is always going to be low enough for Rust to just step over it like it's barely even there.

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

#38

Expected a safety fight. The talk didn't deliver :(

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

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

#39

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…

IMHO Rust is between C and C++: more secure and powerful than C, simpler than C++, but it has the potential to do everything.

If you already know C and Python, it would be a better and faster choice. I’m more a C++ expert, but I’ve written a few small command line tools in Rust and it looked a bit like the Python equivalents.

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

#40
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…

If I’m being too generous in this discussion (and I was trying to be), saying “whatever the compiler does this week” is far too harsh. The Rust Project has a commitment to stability that they’ve followed through with for almost a decade now. The amount of times my existing code has broken has been very, very low.
Post reply on HN