Friday, June 28, 2013

C++ Revsited: Do you really know C++?

I haven't work with C++ for YEARS. I think I know my C. I like its simplicity. (Though pointers are hairy). There are plenty of bozos who just use // in comments and cout instead of printf and claim they do C++. Well, yes, that... is using C++ as a "a better C".

Do I know C++? Yes, I know some aspects of it. The OOP of C++ is of course much more straightforward than Objective C. Sure, define class like a struct, use ":" to derive subclass. Label your methods public, private, protected, and you don't have to label each method like in Java. Ok, that "virtual" keyword is a bit confusing too. Hey Java can do it without this keyword.

However, much of the world wants web applications. Is it even possible to write a C/C++ web app? Java is much more straight forward for that with plenty of library to use. Good bye C++. I said goodbye to C++ for decades.

Ok, people are not going to quiz you basic stuff. Do you know about Run Time Type Information (RTTI) and its related keywords:

  • static_cast
  • reinterpret_cast
  • const_cast
  • dynamic_cast
Waita minute was these even invented when I work with C++ in college? Um, I am not so familiar with these but my question is... why bother casting your objects around that much. Read all about them here.

No comments: