I've learned Rust Before C++ and it completely changed the way I code C++
Title. When I started C++ around 10 months ago, I was first introduced to Haskell, and Lisp-family language, in class and heard that Rust was rising in popularity, so I gave the language a shot. Many cool features I see after knowing a tiny bit of Haskell in Rust are, of course, ADTs, match, higher-order functions, etc. My fav has always been Rust's ADTs.
I've done C and Python for school, so surprisingly, I didn't see Rust's borrow checker impose much of a problem when first starting, contrary to popular belief. I see the language is very elegant, so much so that every time I want to start a new project, Rust is always my default tool.
Anyways, I figured I should fill in the gaps in my C++, because I'd be a bit fraudulent if people see that a small part of my current internship has C++ in it, even though I don't think I've written more than 10 lines for it. So I started learning Vulkan in C++ to see why people love this language when Rust exists.
As expected, the language is a bit...bad, in terms of its surrounding ecosystem. Things like no unified convention for variable naming, a weird std API, like no vector pop? And most despicable: CMake.
I figured I'd try out C++23, and I wrote my code basically like Rust. Even things like when writing a class constructor, I prefer static std::expected<Foo, std::string>. And abused the heck out of const Foo& . Also, std::cout is yucky; I prefer std::println