90s_dev 6 days ago

I will be using this to learn both Rust and C++ and see which one I like better.

2
Tyr42 6 days ago

I've taken a look, and it's definitely expecting you to know some C++. Or at least, it spends equal time on both, which means it can't warn you about the foot guns in c++.

skrishnamurthi 6 days ago

It's definitely written from the perspective of someone who "knows C++". But I put that in quotes because there are (at least) two interpretations of that phrase. There's the person who doesn't know any C++ at all, and for that person, this is useless. But there's the person who knows a baseline of C++ but doesn't know modern C++, and they can use this as a way to modernize their C++ code while ignoring the Rust bits. But either way, yes, it doesn't warn you about C++ footguns (other than pointing you towards Rust <-;).

jpc0 6 days ago

There are patterns diffused in this paper that are modern C++ only in the sense that anything post C++11 is modern C++. That was 14 years ago, you will be hard pressed to find a toolchain that doesn’t support C++17 at this point, yes there is probably some unfortunate person building for debian old-stable or some ancient but still supported redhat but at that point you know you aren’t following modern practices and you have your reasons.

pjmlp 6 days ago

I will also debate that plenty of "modern" C++ features that people attribute to C++11, were already possible throughout C++ARM to C++03, but apparently many either weren't paying attention, or only renaming their C files into .cpp/.cxx/.C.

Just like the low level stuff done by MFC, and how much more ergonomic CSet++, OWL and VCL happened to be.

Mond_ 6 days ago

This isn't much of a tutorial or learning guide, it's a lookup table that roughly pattern matches C++ to Rust.

Probably not the best place to start learning.