Imperfect C++

When my life was less cluttered and I seemed to have more time to myself, I used to go cycling regularly with a group of friends in West Yorkshire. One of the group, Matthew, was a PhD student at the time and the brother-in-law of a very good friend of mine. Over time, Matthew became a friend and we used to enjoy cycling together across the hills and roads of Yorkshire.

Since that time Mathew has made several bad life choices. On finishing his PhD he pursued a career in Software Engineering, actually choosing to spend his time writing C++! He then compounded all this wrong thinking by leaving Yorkshire and emigrating to Australia, the homeland of his beautiful wife. Now he has written a book about C++.

What can I say? Such promise gone so badly wrong. ;-)

If you are unfortunate enough to have to work with C++ source for any reason, then I can only recommend that you go out and buy this book (I will declare my interest at this point and say that I did review the book.). I can't say that I agree with every sentiment in the book, but it's well written and you are sure to learn lots about C++ along the way.

I wonder whether Matthew has scored an own goal on behalf of the C++ community though. Although his book is brilliant and certainly does show many techniques which can be applied to make C++ more usable; most readers are likely to be deterred from consideration of the language due to the complexity of the techniques required.

Comments:

I don't understand your C++ bashing. I use C++ daily at work and have some knowledge of other languages (eg. C#, Python, Haskell) and I still believe that C++ is the most powerful of them all. While it is true that C++ is relatively complex and due to its C compability a little redundant this complexity exists for a reason. I have yet to see a true contender that could replace C++.

Posted by Anonymous on October 27, 2004 at 01:27 PM BST #

I certainly understand the criticism of C++. When you compare C++ with Objective-C, especially, you see how defective C++ is.

Posted by PatrickG on October 27, 2004 at 01:56 PM BST #

<p/> I would hardly call it a bashing, more like a gentle poke. <p/> Before I joined the Solaris Kernel Group I used to work in Sun's Customer Benchmarking Centre in the UK. I saw a lot of C++ in that job and without wishing to offend anyone I can confidently write that none of the code was satisfactory for the job for which it was designed. Dificult to maintain, buggy, slow, non-scaleable... <p/> The main problem is that the language is just too powerful (i.e. complicated) for the vast majority of programmers. Most programmers don't know how little they know about C++. <p/> When they do learn how little they know about the language, they look for a better solution. <p/> For me, the solutions are:
  • System Programming - C
  • Internet Programming - Java
  • Scripting - Python/Ksh/Ruby (whatever...)
<p/> Then there are more specific languages for more specific problem domains: lisp for customising emacs ;-) and prolog for expert systems, etc... <p/> I don't want to get into a war of languages (I've made that mistake before), so don't expect there to be a reply to any flames. I just felt Anonymous deserved a reply. BTW, you should get the book if you do use C++. <p/>

Posted by Gary on October 28, 2004 at 02:37 AM BST #

I share with Gary a belief that there is no perfect language, and that different languages are suitable for different tasks. (Current one's that are strongly of interest are Ruby and D.) However, I continue to believe that C++ is the pre-eminent general purpose language, and for good reason. Sure, it's not perfect (one might even say imperfect ...), but it's like that old comment about democracy: it stinks, but all the alternatives stink more.

(Hopefully) one thing this book achieves is to show C++ practitioners how it might be made to stink less. One great thing about C++ is that it contains facilities for self-healing - mainly templates, of course - which is hard to say about other languages and their equally (if not more so) horrible flaws.

The book's focus is entirely about identifying imperfections in C++, and in fixing them, which is how it distinguishes itself from other books (on C++ and others) which merely lament one's lot and impotently advise avoidance.

Posted by Interested Party ... ;) on October 28, 2004 at 03:53 AM BST #

Post a Comment:
Comments are closed for this entry.
About

garypen

Search

Archives
« April 2014
MonTueWedThuFriSatSun
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
    
       
Today