Print

C11/C++11: Building blocks for the future



Larry O Brien
Email
August 27, 2012 —  (Page 1 of 4)
With single instructions taking less than a nanosecond to execute, and data chugging its way over the Internet with latencies in the dozens and hundreds of milliseconds, there’s ample room in the middle for a productivity-enhancing, language-generalizing, safety-increasing virtual machine. Except when there isn’t, as when pushing a huge dataset through a mathematical transformation, or when the abstraction provided by the VM or language allocates memory that is not strictly needed by the domain logic.

Apple has proved the popular appeal of rapid OS evolution (particularly in the mobile market), and new operating system capabilities are not generally available to the managed platforms. The JVM is particularly troubled by lowest-common-denominator capabilities, but Microsoft too has failed to deliver on its decade-old promise to make the CLR an equal, if not the primary, interface to Windows. Last year’s panic about Microsoft “abandoning .NET” proved to be overblown (an overreaction to “what was not said” at a few presentations), but it is absolutely true that Microsoft is emphasizing C++ development more prominently than it has in a decade.

In addition, while there’s plenty of time in the middle ground between clock speeds, network latencies and user-perceivable performance, the “put a VM in it” model introduces a significant energy penalty, since most VM instructions translate into multiple native instructions. Anyone who’s looked at a teardown of a tablet or a small notebook knows the astonishing volume dedicated to the battery, and battery life is the most important feature for smartphone buyers.

Finally, although C and C++ get little respect from the academic language community, it is hard to ignore the fact that they remain at or near the very top of languages mentioned in help wanted ads: knowing C and C++ remains one of the very most valuable skills to have in your portfolio.

There are two major criticisms of C and C++: that the languages are not highly productive for application development, and that they are too complex. The latter is often made more emphatic by the complaint that the two languages are “designed by committee.” Both critiques have a good dose of truth. C and C++ have traditionally required significant effort to manage memory, bugs have a tendency to be more opaque than in managed languages, and the edit-run-debug cycle can be very slow in larger codebases.

And for complexity? Well, yeah. C++’s template facility is Turing complete and high-performing, which has led to the no-doubt complex technique of “template metaprogramming.” And both languages show the strata of the many epochs of programming during which they’ve evolved: integer types of ever-increasing sizes, archaic keywords like register and inline (I know, they’re not archaic everywhere), and perhaps above all the evolution of character representations and the string libraries, which have had to be improved to deal with both Unicode and buffer-overflow vulnerabilities.

Having said all that, one of the most interesting things about C++11 is that “making C++ easier to teach and learn” was one of the two leading goals, according to language designer Bjarne Stroustrup. The other was to “make C++ a better language for systems programming and library building.”


Related Search Term(s): C, C++

Pages 1 2 3 4 


Share this link: http://sdt.bz/36891
 

close
NEXT ARTICLE
News Briefs: November 15, 2008
Metaforic comes out with a new security product for monitoring networks, ICEsoft and ILOG announce that they are merging their technologies for later releases, and Urbancode adds pre-flight builds for testers to AnthillPro Read More...
 
 
 




News on Monday  more>>
Android Developer News  more>>
SharePoint Tech Report  more>>
Big Data TechReport  more>>

   
 
 

 


Download Current Issue
MAY 2013 PDF ISSUE

Need Back Issues?
DOWNLOAD HERE

Want to subscribe?


 
 
 
 

Events calendar tab
5/21/2013 to 5/23/2013
Las Vegas
CTIA

5/28/2013 to 5/31/2013
Boston
BZ Media LLC

5/28/2013 to 5/30/2013
San Francisco
O'Reilly Media

6/2/2013 to 6/7/2013
Las Vegas
SQE

6/2/2013 to 6/6/2013
Orlando
IBM Rational