Thursday, November 6, 2008

C++ Considered Harmful (?!)

Lately, I have been following an interesting discussion started a some weeks ago by Eric Raymond on his blog. The subject is a very touchy one as the title of the work ESR is working on (and which motivated his post) is : “Why C++ is Not Our Favorite Programming Language”. As anyone could guess, this post have generated a certain amount of reactions over more than a month. It's overall a great read which I strongly recommend for C++ lovers and haters.

Since I'm in no way the C++ guru (although I have been using it for a good 10 years), I'm confining myself to respectfully taking-in comments from both sides. This doesn't mean that I don't have my opinion on C++ and its supposed harmfulness. Is C++ complex and confusing? Yes, some is. Is C++ syntax tricky? Not so much. As much as possible I try to stay away from all the features I found to add more complications that their are really worth (e.g Templates, iostream ...). In fact, I'm really using C++ in the way it first came about : C with objects.

While I'm on the C++ subject, Kevlin Henney recently (March of this year) participated to a Google Tech Talk, in which he talked about C++ Stylistics. A good talk worth watching IMHO:




As I have been moving away from C++ (on to Objective-C), I have become a bit more critical of C++ lately. I guess I'm having too much fun with Objective-C and Cocoa to be really language agnostic anymore ... so C++? Yuk!

No comments: