NEWSLETTERS
 

CIO.com updates, insights and advice on technology, management and your career.

 CIO BlackBerry News and Tips
 CIO Research and Analysis
 CIO Microsoft
 CIO Insider
 
 
 
SUBSCRIBE TO CIO
 
Are you involved in setting the direction for your company's IT budget or strategy?

Apply today for a FREE subscription to CIO Magazine!

 


Fri, Sep 7, 2007 12:24 EDT

Linus Torvalds: Why C++ Sucks

Topic: Development

Blog: Web 2.0 Advisor

Current Rating: 5 Comments: 13

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?


You do not have flash or javascript support.
Average (2 votes)
5
 
 
Sat, Sep 8, 2007 14:38 EDT
Anonymous user
Posted by: glyph
Rating: 70

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.

 
Tue, Sep 18, 2007 21:51 EDT
Posted by: jhx
Rating: 90

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!

 
Tue, Jan 20, 2009 18:27 EST
Anonymous user
Posted by: Anonymous
Rating: 90

He's also changed the world to a much greater extent that you will.

 
Mon, Sep 10, 2007 11:26 EDT
Anonymous user
Posted by: BigMikeK
Rating: 70

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.

 
Mon, Sep 10, 2007 13:59 EDT
Anonymous user
Posted by: steffcaldwell
Rating: 70

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.

Post new comment

* Subject:
* Username:
* E-mail:
The content of this field is kept private and will not be shown publicly.
Homepage:
* Body:
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img> <blockquote> <strike> <p> <br>
  • Lines and paragraphs break automatically.
More information about formatting options

* Denotes required field.

About this Blog

C.G. Lynch chronicles what matters (and what doesn't) in the world of social networking, Web 2.0 and consumer applications.

Start a Conversation
Click to post

Got something to say? We want to hear it! Click the Post button to get started. GO»

EXPERT ADVICE
See our roster of experts.

Advice & Opinion from more than 113 of IT's most insightful thinkers.

  PARTNERS       WEBCASTS    
 

Windows 7 Webcast Series

There's a lot of buzz about Windows 7 out there. Each month in our webcast series, listen to analysts and customers discuss how Windows 7 and the Windows Optimized Desktop is impacting large companies around the world. Learn how they evaluated Windows 7, including the cost of deployment, deployment strategies, and tangible benefits.

Sponsored by Microsoft  Listen to on-demand Recordings »

 

Service Level Management Best Practices Life Cycle Overview - Improve Service Levels

Best practices for Service Level Management (SLM) is a process for consistently meeting customer requirements and delivering on IT's promises. See the steps required to ensure high-quality SLM.

Sponsored by Compuware  Read this White Paper »

 

Keeping Your Members Safe from Online Scams and Predators

In order to keep fraudsters out, romance sites must deploy effective solutions that look at information independent of what is supplied by users. A device fingerprinting solution such as iovation ReputationManager™ provides unique insight into the computers being used to create multiple accounts and exposes hidden device-account relationships that identity-based fraud solutions often miss.

Sponsored by iovation  Read this White Paper »

Resource Alerts

Get instant email notifications by topic when white papers, webcasts, and case studies are added to our library.

Resource Alerts

Get instant email notification when white papers, webcasts, and case studies are added to our library. Don't just be up-to-date—be up to the minute with our new Resource Alerts.

Defend Against Blended Threats: What You Need to Know

Blended Web and email threats are becoming increasingly complex and represent a huge...  View Now »

 

Prescriptive Actions to Reduce Risk

In this Webcast, learn best practices for effective systems management in a heterogeneous environment and keep client systems cost under control.   View Now »

 

Webcast- Vantage 11: Redefining Application Performance Management

Compuware's latest release, Vantage 11, is a major advance in end-to-end application performance management--bringing together proactive issue identification, quantification of business impact and problem resolution into a single solution. Tune in to learn how Vantage 11's top-down approach helps you make better decisions and dramatically lower operations costs.  View Now »

Resource Alerts

Get instant email notification when white papers, webcasts, and case studies are added to our library. Don't just be up-to-date—be up to the minute with our new Resource Alerts.

 
NEWSLETTER

Sign-up for the Blogs & Discussion Newsletter

 
FEATURED SPONSORS
 
 
 
SPONSORED LINKS
 

Top Five CIO Challenges

Streamline IT Costs. Boost Performance with WAN Optimization.

Want to know how you can maximize employee productivity?

Build your 1st app FREE with Force.com

TDWI checklist helps define data readiness for analytics. Download report.

Increase UPS efficiency without sacrificing protection.

A Clear View Toward Virtualization

Virtualization Technology as a Business Solution

The rules of infrastructure management just changed.

A Clear View Toward Virtualization

Interactive Q&A helps you discover key ways to maximize IT assets.

Ready to virtualize tier one applications? Check your virtualization maturity.

Think you can't afford a Cisco Switch? Cisco Catalyst Switches are now more affordable.

Five minute business analytics assessment. Immediate results.

The Case for Investing in Business Analytics Technology. Read white paper.

White Paper: A Security Blueprint Delivered From within the Network

Translate business strategy into IT strategy and obtain maximum benefits.

Learn how advanced forecasting tools can deliver significant business results for global corporations.

eBook: How Can You Make Your People Productive Anywhere?

What's New in SOA Suite 11g?

Unleash the Power of Java with Oracle JRockit Real Time

SOA Best Practices and Design Patterns

Enhance Customer Loyalty through Higher Responsiveness

Achieving Business Agility with Application Grid

White Paper: Visibility and the New Normal of Mobile Work

Unified Communications: Thoughts, Strategies and Predictions. Join the discussion

Read the RSA report: Security for Business Innovation

Webcast: Looking to the Cloud for Email and Collaboration Services

64-page prescriptive guide to security, compliance, and IT operations.

Keep your IT expertise up to date. Join the Intel Premier IT Professionals.

A new fleet of PCs with a total ROI in 10 months. Find your ROI.

eZine: A Roadmap to Reducing IT Complexity

Reduce risk, gain agility. See how Progress can help your business.

Virtualization Technology as a Business Solution

eZine: A Roadmap to Reducing IT Complexity

World-class trading technology solutions from NYSE Technologies.

If You're Paying for Telecom, You're Paying Too Much. Contact Asentinel Today.

Trade-In your old printer and save up to $1,000 plus free recycling!

infoBOOM! - The Mid-Sized Company CIO's Exclusive Community

Live Webinar: Applying Business Analytics. Click here to learn more

Generation Remote Infrastructure Management - Changing the Paradigm

Cloud-Based Email Management: Opinion Shifts In Favor

The Key to Proving and Improving the Value of IT to the Company

Learn how to maximize the mobile web opportunity

Unlocking the Mainframe: Modernizing Legacy System to SOA

State of the Data Integration Market

Lower IT Costs with Oracle Database 11g Release 2

Application Grid: Ideal Platform for IT Consolidation

Mind the Talent Gap: Global Survey on IT and HR trends and challenges

Managed Security for a Not-So-Secure World - Read this White Paper.