Hacker News new | past | comments | ask | show | jobs | submit login

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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: