This post originated from an RSS feed registered with .NET Buzz
by Sam Gentile.
Original Post: On unmanaged C++ and friction
Feed Title: Sam Gentile's Blog
Feed URL: http://samgentile.com/blog/Rss.aspx
Feed Description: .NET and Software Development from an experienced perspective - .NET/CLR, Rotor, Interop, MC+/C++, COM+, ES, Mac OS X, Extreme Programming and More!
So, I was on my hour train ride into work and with nada to do, actually started re-reading Meyer's classic More Effective C++ that I was carrying into work and it brought back un-fond memories of the way it used to be. Now, of course this book (and Effective C++) is a must-read for unmanged C++ programmers and you simply cannot program in native C++ without it, but with years away from this, and in the CLR world, it just struck me just how much friction there is with this language. It goes like this (with apologies to my dear friend John Lam whose theory I ripped off): There are 5 + or - slots in the head to hold info (think a vtable!) and the more friction something is with all sorts of innane nuances, the more slots are filled in the head, and thus the less you available tto do real work and thinking, like solving business problems. This is the whole argument for the CLR right? (and Java, Smalltalk, etc). It just amazed me remembering with page after page of nuances tthat you have to know to have your program even have a chance of compiling never mind working instead of just solving the problem you wanted to in the first place. Page 10 references refering to derefenced null pointers “The results are undefined”; Page 16 “...almost never works the way you want it to”; knowing about making your destructors virtual and why (this is one of our test questions!); all sort sof things that lead to leaks, on and on and on. All the slots are full and there is none left to think about the problem you set out to solve. Bad memories.