4 ms·
I learned VB, Java, python, "C++", C, JS, go, rust, "Real" C++, in roughly that order. The first c++ is basically writing c with classes. Enough to write Arduin
by kortex 6y ago
I learned VB, Java, python, "C++", C, JS, go, rust, "Real" C++, in roughly that order. The first c++ is basically writing c with classes. Enough to write Arduino stuff. The latter is learning modern ish c++14. Smart pointers, copy and move constructors, lots of boost, move semantics (I still don't grok &&). Also, interfacing with c++98 and C drivers. On top of that, Cmake for building complex c++ projects.
I thought rust had a steep learning curve and borrow mechanics were hard. Boy howdy, "Real" c++ makes rust look like a cake walk. C++ has basically all the borrow mechanics of rust, it's just verbose, tedious
, idiosyncratic, and bolted on. Plus umpteen other ways to pass data around.
The package and build system just works.
IMHO The "only" real advantages c++ has over rust are momentum, availability, and the ability to natively use C can code. The mind share, library ecosystem, and ubiquity are unmatched. However I see a point where wrapping FFI becomes easy enough that this last advantage becomes a draw. The second is fixed by more compiler support.
Compared to Java, rust is less verbose, faster, less memory, and better abstractions, though I haven't touched Java in 5 years.
The rust experience is so much better than C++ that I see it continuously eating into mind share. I think the joy comes from the relief of frustration of working with automatic foot guns for years.
- deleted 6y ago[deleted]