In terms of LoC, I'm probably at 25% C++, 65% Dart (Flutter) and 10% Kotlin/Swift. Probably not enough to qualify as "main language", but enough that I'm writing it multiple times a week.
C++ for the low-level machine learning (Kaldi/ONNX) & rendering (Filament) components, Dart for the service/model/view layers and Kotlin/Swift for hooking things up to native APIs.
I can't claim to be a C++ expert but I've found that working with RAII, staying away from templates and being slow to incorporate newer (>C++11) features keeps things reasonably sane. The standard library is definitely painful to use in places (streams, chrono, etc) but all things considered, I still prefer it to Rust.
Should have been clearer - Rust wins when it comes to the standard library, but I dislike the syntax and prefer C++ the language.
I think the relative ubiquity of C makes transitioning to C++ a lot easier. If you wiped my memory of the last 20 years of programming and forced me to learn both C++ and Rust from scratch, maybe I'd think differently.
IMO the C++11 and later features can make it easier to use, less error-prone, and slightly more like Rust. Avoiding them entirely is probably a mistake.
I would concur, having used c++ as my daily driver since before the 98 standard, I prefer the new way to the old on mostly everything. Clang-tidy has modernization checks to help with stuff like that. I don't go trying to use the new features on purpose, but when I do something that has a new way, I do it. Pass by value, move don't copy. Auto wherever I can, but decorate the type on the rhs.
Oh, I definitely don't avoid them entirely (I'm very liberal when it comes to unique_ptr in particular). It's more about not jumping headfirst into new features that I don't fully grok (or more importantly, when I don't really understand why you might prefer new feature X over old feature Y).
strongly agree. c++ without shared_ptr and unique_ptr is not a language i want to use. although the primary reason i like c++ is templates, so the grandparent poster and i would probably have nearly opposite ideas of what the good subset of c++ is.
C++ for the low-level machine learning (Kaldi/ONNX) & rendering (Filament) components, Dart for the service/model/view layers and Kotlin/Swift for hooking things up to native APIs.
I can't claim to be a C++ expert but I've found that working with RAII, staying away from templates and being slow to incorporate newer (>C++11) features keeps things reasonably sane. The standard library is definitely painful to use in places (streams, chrono, etc) but all things considered, I still prefer it to Rust.