MessiandNeymar

  • Subscribe to our RSS feed.
  • Twitter
  • StumbleUpon
  • Reddit
  • Facebook
  • Digg

Sunday, October 28, 2012

The slow maturation of C++

Posted on 1:02 PM by Unknown

As the C++ programming language prepares to begin its fourth decade (Stroustrup apparently first called it "C++" in 1983), it continues to slowly stabilize.

For one thing, compilers are starting to support significant subsets of the recently standardized "C++ 11" version of the language, as these notes from David Simmons describe. Another good source of such information is this page from Scott Meyers: Summary of C++11 Feature Availability in gcc and MSVC.

Of course, it's more than just the language and its compilers; you have to have a complete "ecosystem" in order to have a complete programming language. Over at the Google Testing Blog, Zhanyong Wan describes the various reasons why Google decided to build their own C++ unit testing framework: Why Are There So Many C++ Testing Frameworks?

You might wonder, when a language like Java was able to reach this level of maturity in half the time, why is C++ still struggling with these sorts of issues after more than 30 years of development? As the Google team point out, the comparison is somewhat unfair, since Java was in some ways created as a response to exactly this question:

Unlike Java, which has the famous slogan "Write once, run anywhere," C++ code is being written in a much more diverse environment. Due to the complexity of the language and the need to do low-level tasks, compatibility between different C++ compilers and even different versions of the same compiler is poor. There is a C++ standard, but it's not well supported by compiler vendors. For many tasks you have to rely on unportable extensions or platform-specific functionality. This makes it hard to write a reasonably complex system that can be built using many different compilers and works on many platforms.

And as the Google team point out, it's fundamentally much easier to write a testing framework for Java than for C++, for a variety of reasons, including:

Another reason is that some limitations of C++ make it impossible to implement certain features really well, and different people chose different ways to workaround the limitations. One notable example is that C++ is a statically-typed language and doesn't support reflection. Most Java testing frameworks use reflection to automatically discover tests you've written such that you don't have to register them one-by-one. This is a good thing as manually registering tests is tedious and you can easily write a test and forget to register it. Since C++ has no reflection, we have to do it differently.

I regularly write in both Java and C++. It is vastly easier to write in Java, but with care I can be quite productive in C++. Tools like testing harnesses and high quality compilers are a big part of whatever language ecosystem you're part of, so it's good to see that the C++ versions continue to move along, however slowly.

I mean, after all, it could be worse: apparently, the second most popular programming language in Japan is COBOL!!

Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Posted in | No comments
Newer Post Older Post Home

0 comments:

Post a Comment

Subscribe to: Post Comments (Atom)

Popular Posts

  • Shelter
    I meant to post this as part of my article on Watership Down , but then totally forgot: Shelter In Shelter you experience the wild as a moth...
  • The Legend of 1900: a very short review
    Fifteen years late, we stumbled across The Legend of 1900 . I suspect that 1900 is the sort of movie that many people despise, and a few peo...
  • Rediscovering Watership Down
    As a child, I was a precocious and voracious reader. In my early teens, ravenous and impatient, I raced through Richard Adams's Watershi...
  • Must be a heck of a rainstorm in Donetsk
    During today's Euro 2012 match between Ukraine and France, the game was suspended due to weather conditions, which is a quite rare occur...
  • Beethoven and Jonathan Biss
    I'm really enjoying the latest Coursera class that I'm taking: Exploring Beethoven’s Piano Sonatas . This course takes an inside-out...
  • Starting today, the games count
    In honor of the occasion: The Autumn Wind is a pirate, Blustering in from sea, With a rollocking song, he sweeps along, Swaggering boisterou...
  • Parbuckling
    The enormous project to right and remove the remains of the Costa Concordia is now well underway. There's some nice reporting on the NP...
  • For your weekend reading
    I don't want you to be bored this weekend, so I thought I'd pass along some articles you might find interesting. If not, hopefully y...
  • Are some algorithms simply too hard to implement correctly?
    I recently got around to reading a rather old paper: McKusick and Ganger: Soft Updates: A Technique for Eliminating Most Synchronous Writes ...
  • Don't see me!
    When she was young, and she had done something she was embarrassed by or felt guilty about, my daughter would sometimes hold up her hand to ...

Blog Archive

  • ►  2013 (165)
    • ►  September (14)
    • ►  August (19)
    • ►  July (16)
    • ►  June (17)
    • ►  May (17)
    • ►  April (18)
    • ►  March (24)
    • ►  February (19)
    • ►  January (21)
  • ▼  2012 (335)
    • ►  December (23)
    • ►  November (30)
    • ▼  October (33)
      • HMS Bounty RIP
      • Programmers and Paparazzi
      • 24 hours with the "17"
      • The slow maturation of C++
      • Kinda quiet recently...
      • A random collection of random stuff
      • IPv6 Summit in Slovenia
      • Instance tasting
      • New Linux 0, Old Laptop 1
      • Quantal Quetzal
      • Photo-essay on cork production
      • Facing the tsunami
      • The age of books is not yet over
      • Paul Allen is in the Bay Area
      • Scott Hanselman nails it
      • Once there was a sailboat...
      • Wind: 1, Oracle: 0
      • Presidential Precedent
      • Drilling down, spreading the load
      • XCOM Enemy Unknown
      • MOOCing again
      • Gawker outs VA
      • Harborside Health
      • It's not just a game ...
      • Leo Messi piece on ESPN
      • Social coding and Atlassian Stash
      • Gone Girl: a very short review
      • Computers and Chess
      • A translation guide for the culturally impaired
      • Russell Coutts goes airborne!
      • Perforce Git Fusion
      • SHA-3 is Keccak
      • San Francisco Measure F
    • ►  September (34)
    • ►  August (29)
    • ►  July (39)
    • ►  June (27)
    • ►  May (48)
    • ►  April (32)
    • ►  March (30)
    • ►  February (10)
Powered by Blogger.

About Me

Unknown
View my complete profile