Rants
Questions
Soapbox
Best Practices
Apply today for a FREE subscription to CIO Magazine!
Fri, Sep 7, 2007 12:24 EDT

|
Posted by: Esther Schindler in Soapbox Topic: DevelopmentBlog: Web 2.0 Advisor
Current Rating: |
The War of the Roses had nothing on the language wars. Since the beginning of my computing career, I've watched developers fight over the relative virtues of programming languages... from C versus Pascal to Ruby versus Python. What is it about this subject that brings out such passion?
Linus Torvalds has recently gotten into the fray, posting a message on a techie list in which he says outright that C++ is a horrible language. "It's made more horrible by the fact that a lot of substandard programmers use it, to the point where it's much much easier to generate total and utter crap with it. Quite frankly, even if the choice of C were to do nothing but keep the C++ programmers out, that in itself would be a huge reason to use C."
According to Torvalds — yes, the Linus of Linux — C++ leads to really really bad design choices. He says that developers "invariably start using the 'nice' library features of the language like STL and Boost and other total and utter crap," that may "help" you program, but they cause infinite amounts of pain when they don't work and inefficient abstracted programming models.
Far be it for me to argue with Torvalds, or to claim the virtues of C++ (though it was C that got me to quit programming and turn to writing full time). But what astonishes me just slightly is that, after all these years, there's still room in the world for such discussions. I'm not sure that I'd say that any language is truly horrible (and I did, back in my programming days, use several of them). (Operating systems, yes. Languages. no.) Some programming languages worked better for certain kinds of apps than did others; I found it easier to "think" in some than in others. (One coworker once opined that I could write FORTRAN code in any language, probably a reflection of the fact that FORTRAN was the first I learned.)
Whatever happened to "Use the best tool for the job"? If your developers have such strong preferences, how do you convince them to use the languages approved in your shop?
Linus shouldn't talk about something he doesn't understand. He couldn't have found a better way to advertise his ignorance about C++ to the whole world than this.
He is telling the whole world that "Hey, here I am, you know, the guy who created the linux kernel, the best designed piece of software in the whole universe(don't listen to Tanenbaum though, he didn't learn OS fundamentals), so you better listen to me when I say that C++ _sucks_. Don't give me the BS about how so many large applications have been created in it, because they would have been only better had they been created in C(it's a magical language btw, solves _all_ your problems in the blink of an eye). If you go and read about people like Stroustrup, Sutter, Alexandrescu, Koening, Thomas etc, take it from me that they missed lot of their CS clases, so they don't know a thing about programming. How do I know? They use C++!"
Sage Linus at one point or the other has to wake up to the fact that he is not the guru of all things that is programming and his opinion of the C++ language is taken as seriously as that of my hair dresser.
Please go read the git forums to understand what actually happened. This story and some of these comments make it sound like Linus was running through the streets with banners that say C++ sucks. A short version of the REAL story...someone posted on the git SCM list stating that git should be reworked in C++ and with no legitimate technical reason other than to make fixing his own problems easier for himself since he is familiar with c++. Linus and git developers retaliated with very reasonable concerns (and with a wee bit of personality:). Most of these comments sound like people need a life or have some different issues to grind on. Please spend time coding something useful rather than making ridiculous comments, OR if you must, please research first!
He's also changed the world to a much greater extent that you will.
Lets face facts - there is no one perfect programming language. It is possible to write beautiful Assembler and ugly C++. The language is just a tool. My personal preference for when I have to get down and dirty is Assembler. This stems, no doubt, from the fact that the first programming language I learn was IBM 360 Assembler. The second was COBOL. If the count of large successful projects is how we determine what is the best language then COBOL wins. My preference for writing new code is straight C. Yes, it WILL let me dig a hole and bury myself. But it also lets me to write what I want and it assumes that the programmer knows what he (or she) is doing.
It's always somewhat entertaining to watch programmers stroke their own egos. People like Linus Torvalds, Paul Graham, and few notable other like to hop up on their digital pedestal and proclaim down to the unwashed masses that everything that they say, in their infinite wisdom, is canon.
Linus' thread is nothing but FUD and virulent opinion. STL and Boost are convenience libraries certainly. It's my conjecture that they weren't designed for system-level type project. They help to make some aspects of programming easier and the abstractions that they provide are adequate. They are designed to be general purpose because the authors of STL and Boost can't possibly take into account every possible consideration that someone might have. They picked the lowest common denominator. If you need something specialized -- you write something specialized simple as that.
Additionally, judging the merits of a language based on the libraries that it has is pointless. Comparing "C" to "C++ & STL" is equally arbitrary and is an apples to oranges comparison that does nothing but make the person doing the comparison look as though they can't differentiate between the language and libraries that are implemented in said language.
Finally, I especially take offense to the denigration of C++ (or any programming language ) by basing the quality of a language on the quality of its users. That's about as dumb as me saying "Trucks are stupid. The features that they add over cars are crap and poorly thought out, in my highly exalted opinion. They are especially useless because their drivers keep crashing them" (I'm sure this analogy is broken, but I hope you get my point).
It's a guilt by association fallacy and an ad hominem attack all rolled into one. Celebrity programmer do nothing but piss me off.