6 ms·
> "Unique_ptr is such a fundamental type that, if one claims to be a c++ programmer, one has to know it and understand how it works." No. Those utilities were
by xtrapolate 8y ago
> "Unique_ptr is such a fundamental type that, if one claims to be a c++ programmer, one has to know it and understand how it works."
No.
Those utilities weren't standardized before C++11. People wrote their own implementations before that. People had to understand stack unwinding and scoping, memory, RAII, design patterns that relate to allocation/de-allocation of memory, ownership transfer.
Then came in the people that decided it'd be a great idea to start quizzing others about C++11 concretions.
- josefx 8y ago> Then came in the people that decided it'd be a great idea to start quizzing others about C++11 concretions. So it has been almost a decade. How much longer before the whole move semantics addition to the language specification becomes relevant to you?
- cjensen 8y agoMove semantics are nice, but they aren't critical or even fundamental to understanding C++. I would bet most C++ programmers do not fully understand them. As a veteran of three decades of C++, I've seen a lot of new hotness turn into old and busted and removed. There's plenty of dark corners where you don't need to look to get a job done.
- AnimalMuppet 8y agoWhen the embedded project I've been working on since 2009 decides to upgrade compiler versions (which will be approximately never). Or when I change jobs or move on to a different project.
- josefx 8y agoMy workplace is still using c++98 since upgrading compilers was too much work and a compatibility risk for our customers. This year I spend almost a month getting new versions of our dependencies to run with the existing setup, cutting out various features along the way. Avoiding that upgrade is no longer beneficial for us.
- xtrapolate 8y ago> "So it has been almost a decade. How much longer before the whole move semantics addition to the language specification becomes relevant to you?" I'm not debating the usefulness of move semantics. I'm debating the weight being placed on them in these so-called "C++ interview questions". Wouldn't it be better to discuss the actual problem, rather than a concrete solution we ended up having in C++11?
- geezerjay 8y ago> Those utilities weren't standardized before C++11. That's quite a disigenuous statement. Work on C++11 started after the approval of c++98, and the c++0x smart pointers have been implemented and available for quite a while before C++11 was finalized.