Wowā¦so many topics in one comment chain, where to begin?
I started programming in VB when I was 14, C++ when I was 16, and .NET when I was 21 (I am now 25). Most of my professional experience has been in .NET, but in terms of personal experience I have more in C++ than .NET. Perhaps I am not what you would call a āsenior developerā in any language, but I do have a considerable amount of experience in both. My general take is that, yes, its slightly easier to shoot yourself in the foot with C++ than .NET, but not excessively so. However, .NET definitely has a shorter ā0 to productiveā learning curve. Regardless, I wholeheartedly agree with Joel Eidsath that āā¦smart programmers can create good products in any language and crappy programmers can create crappy products in any language.ā
As far as the concept of the āPit of Successāā¦its a nice concept, and there are some things in C# regarding that concept that I like (having to mark override methods to guard against ābrittle base classā, for example). In fact, this concept is my biggest argument against dynamic languages, whose ādo whatever you want to however you want toā ideology is a recipe for disaster. However, my biggest concern is that the concept can be taken too far, to the point where the attempt by the language to protect me from myself just gets in my way. VB.NET is the worst example of the problem that I have ever seen; and .NET in general seems to suffer from Microsoftās arrogant assumption that they can know more about my situation from the castle in Redmond than I do sitting at my desk.
I also agree with Joel and Webview that the single biggest advantage of any programming language/platform is library support. The .NET BCL is the single biggest reason why I chose to begin my professional career as a .NET programmer instead of a C++ programmer. As old as C++ is, there are a lot of libraries written for it, for just about every conceivable function. But these libraries have almost nothing in common, and knowing one library does almost nothing to help you learn the next one. With .NET, I know that no matter where I go, I have access to the BCL; and I also feel like third party libraries written in .NET are more consistent with each other than C++ libraries (probably because many .NET programmers will intuitively pattern their own libraries after the BCL, so there is a common point of reference). Yes, C++ has the STL, but it is pretty limited in scope, and although it uses classes, it is not really object-oriented, and therefore doesnāt fit very well into an object-oriented environment (Stepanov, the co-creator of the STL library, has said āI find OOP technically unsound.ā; http://www.stlport.org/resources/StepanovUSA.html).
Finally, regarding GC.Collectā¦James, the link you reference was written by someone who admittedly did not understand how garbage collection works, and most of what he said was based on wrong information and faulty assumptions. The fact is, the VAST MAJORITY of the time, GC.Collect will not help, and can in fact make things worse by disrupting the GCās auto-tuning functionality. However, it exists for a reason, and if you can demonstrate that your app doesnāt work without it but works with it, then no one has any right to argue with you. However, if you find yourself in this position, I would encourage you to open a dialouge with Microsoft; I am fairly certain that they would take a significant interest in a situation in which GC.Collect is preventing OutOfMemoryExceptions (contrary to all of their published material on the subject).