Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

No wonder you find C++ pleasurable, you are using it as C with classes!

I also find C++ pleasurable (90% of the time) and in my code, I make heavy use of templates (including compile-time calculation/preparation of data, ie not only simple "templates as generics"), exceptions (well, not heavy use, I use them for handling exceptional circumstances, nothing more), STL (especially the containers), std::string (C strings and custom string classes are evil), Boost (not so much, but it has some great libraries), Qt (GUI mainly, but also the support libraries) and Intel Threading Building Blocks. I do not use multiple inheritance, but I certainly use classes and single inheritance, pointers, smart pointers and memory pools.

But I still like C++.

I agree that it has its problems and it certainly isn't a good language for beginners [1], but it is a very flexible and powerful language that is useful for a range of tasks from low-level to high-level code (though I guess it excells at mid-level: higher level that C, but low level enough for performance sensitive code, eg games). I certainly wouldn't recommend it for a lot of tasks, but I wouldn't avoid it either.

I'm not a big fan of the FQA, but the FAQ Lite is very good: http://www.parashift.com/c++-faq-lite/index.html also, Bjarne Stroustrups FAQ is excellent: http://www2.research.att.com/~bs/bs_faq2.html

[1] Even experts got this quiz wrong: https://scapecode.com/2009/10/a-simple-c-quiz/



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

Search: