3 ms·
Once you know C, you've already gone through most of the pain with regard to C++s warts, but you still have to treat it as a new language. I really don't know
by nly 13y ago
Once you know C, you've already gone through most of the pain with regard to C++s warts, but you still have to treat it as a new language.
I really don't know why people have such a problem getting to grips with pure-C++ functionality like templates, virtual functions, inheritance, RAII, exceptions, references, type system oddities, rvalues and lvalues and their references, operator overloads, extended temporary lifetimes, smart pointers, runtime type information, the lack of decent unicode support, slow compilation times, binary compatibility which is tricky to maintain, member function pointers, virtual base class construction order, SFINAE, and static polymorphism and concept checking.
It's really not that difficult... ;)
- sixbrx 13y agoYou had me until "type system oddities" which was a spoiler :)
- alkonaut 13y agoI don't mind the C++ that is "C with objects". What bothers me is the broken template metaprogramming, endlessly varying kinds of special pointers, massive libraries that does the same things slightly differently and so on.
- 72deluxe 13y ago"endlessly varying kinds of special pointers" haha that made me laugh thanks! I had never noticed it before! TBH, although Bjarne in his most recent book heartily recommends using references everywhere and smart pointers, I seem to be throwing pointers around with no problems. The RAII approach and clean up in the destructor is the safest way to do things in C++, and the tidiest! I would have great difficulty moving over to C to think of a way to write a program, so it is comforting to find someone who would struggle to move to C++ from C. They really are different beasts. Again, thanks for the laugh haha