Feeds

Sutter: C++11 kicks old-school coding into 21st century

Language officially infused with Java-like multi-core support

Providing a secure and efficient Helpdesk

There's a new C++ in town: C++11 has been approved and published by international standards chiefs.

C++11 is the first major revision to one of the world's most popular programming languages in 13 years. The update will position apps using the language for coding for the next two decades. C++11 was published by the ISO on Tuesday following ratification of the standard in August.

One of the biggest changes in the spec helps make C++ a little more Java-ier: the introduction of a standardised multi-core-friendly memory model that Java has had since 2005.

The standardised memory model is intended to save developers from having to build or pick their own libraries in order to achieve concurrency in C++11 applications. The idea is to introduce greater consistency in the way apps are built when running on the kind of multi-core processor chips that power servers in data centres and can be found in the smartphones running in your hand.

Herb Sutter, photo: Microsoft PDC

Sutter: Modern C++ code is as clean and safe as code written other modern languages.

C++ steward Herb Sutter, convener of the ISO/ANSI C++ Standards committee since 2002, reckons C++11 makes the case for "traditional" languages in a world of managed platforms.

Concurrency has been one of Sutter's crusades. In 2005 Sutter told devs that the free lunch of single-core was over and that C++ had to go concurrent.

Sutter's employer, Microsoft, took the managed platforms route last decade with the introduction of .NET and the Common Language Infrastructure, which were part of Microsoft's answer to Sun Microsystems' then-new Java. Sutter has been Microsoft's lead designer of C++/CLI and extensions to Visual C++ for parallel programming.

Java daddy James Gosling, meanwhile, is reported to have said that Java is C++ without the guns, knives or clubs.

Sutter said that C++11 incorporates many of the best features of managed languages like Java, which he reckoned emphasise programmer convenience at the expense of express power and performance through features like always-on garbage collection.

"'Traditional' programming using native languages like C++ – which emphasize expressive power and a pay-as-you-go philosophy of avoiding performance overheads unless features are actually used in the programme – never really went away," Sutter said.

"Now with C++11's improvements that incorporate many of the best features of managed languages, modern C++ code is as clean and safe as code written other modern languages, as well as fast, with performance by default and full access to the underlying system whenever you need it."

When we spoke to Sutter earlier this year, he said garbage collection would likely be proposed for the successor to C++11: it was in the C++11 mix but cut due to a lack of time.

Other changes in C++11, meanwhile, include lambda functions, move semantics and variadic templates: this all makes programming an easier and less profane experience and helps C++ apps tap the power of the underlying hardware they are running on.

Speaking to The Reg, Sutter reckoned C++11 feels like a fresh language, with all the power and descriptiveness C++ fans know and love. ®

Internet Security Threat Report 2014

More from The Register

next story
Microsoft on the Threshold of a new name for Windows next week
Rebranded OS reportedly set to be flung open by Redmond
'In... 15 feet... you will be HIT BY A TRAIN' Google patents the SPLAT-NAV
Alert system tips oblivious phone junkies to oncoming traffic
Apple: SO sorry for the iOS 8.0.1 UPDATE BUNGLE HORROR
Apple kills 'upgrade'. Hey, Microsoft. You sure you want to be like these guys?
SMASH the Bash bug! Red Hat, Apple scramble for patch batches
'Applying multiple security updates is extremely difficult'
'Google is NOT the gatekeeper to the web, as some claim'
Plus: 'Pretty sure iOS 8.0.2 will just turn the iPhone into a fax machine'
ARM gives Internet of Things a piece of its mind – the Cortex-M7
32-bit core packs some DSP for VIP IoT CPU LOL
'People have forgotten just how late the first iPhone arrived ...'
Plus: 'Google's IDEALISM is an injudicious justification for inappropriate biz practices'
prev story

Whitepapers

Providing a secure and efficient Helpdesk
A single remote control platform for user support is be key to providing an efficient helpdesk. Retain full control over the way in which screen and keystroke data is transmitted.
Intelligent flash storage arrays
Tegile Intelligent Storage Arrays with IntelliFlash helps IT boost storage utilization and effciency while delivering unmatched storage savings and performance.
Beginner's guide to SSL certificates
De-mystify the technology involved and give you the information you need to make the best decision when considering your online security options.
Security for virtualized datacentres
Legacy security solutions are inefficient due to the architectural differences between physical and virtual environments.
Secure remote control for conventional and virtual desktops
Balancing user privacy and privileged access, in accordance with compliance frameworks and legislation. Evaluating any potential remote control choice.