VC++ to Aim at Full ANSI/ISO Compliance?

VC++ to Aim at Full ANSI/ISO Compliance?

Herb Sutter is a recognized expert on C++ software development. Author of more than 150 technical articles and of the widely acclaimed books Exceptional C++ and More Exceptional C++, he regularly gives invited talks to conferences and clients around the world. Herb is secretary of the ISO/ANSI C++ standards committee, contributing editor and columnist for the C/C++ Users Journal and former editor-in-chief of the C++ Report. He currently writes four columns about software development in C++. Visit his Web site at www.gotw.ca.

Several weeks ago, Herb joined Microsoft’s Developer Platform and Evangelism Division, where he acts as a liaison between Microsoft and the C++ developer community. DevX’s C++ Pro, Danny Kalev, interviewed Herb Sutter about his new job, the role of C++ in the .NET framework, and the current state of C++.

: Can you describe your new responsibilities as a liaison between Microsoft and the C++ community? Do they include, for instance, direct involvement in the development process of Visual C++? Regular attendance at Microsoft’s newsgroups? Redesigning and re-implementing the core compiler and its libraries?

A: My job definitely includes giving direct input into the feature set for future releases of Visual C++, to make sure that the product has what the C++ community needs.

Note that by “the C++ community,” I mean everyone who works for or with C++, on all compilers and platforms?that includes in-the-trenches systems and application developers, developers of C++ community libraries like Boost and Loki, the C++ standards committee, C++ book and magazine authors, and anyone else plugged into C++.

Herb Sutter

When I talk to these people in person at software conferences or committee meetings, or electronically via newsgroups or email, I learn what they need, what they’re trying to accomplish, and what their frustrations and suggestions are about Visual C++ in particular and standard C++ in general. That’s the data it’s my job to distill?to separate patterns from noise, well-thought-out requests from blue-ski wish lists?and bring in a useful form to the Visual C++ team. Clearly standards conformance features are part of what the community needs, as are other features such as usability, like having more readable template error messages and checked STL iterators for debugging.

So, that’s half of my job, bringing external input inside to make Visual C++ a better and even more useful product. That doesn’t just mean doing it myself, because if I’m the only route for community contact, I’d end up as a bottleneck and a checkpoint. Rather, it’s also my job to work to create more openness and community access to Microsoft in general.

The other big part of my job is to see how we can better contribute to the global C++ community. That includes doing things like taking cool and useful libraries developed internally in places like Microsoft Research and contributing them for the community to use, whether that’s by contributing them to community libraries or via MSDN or some other route. That also includes rounding up some of the incredible brain power inside the company and getting those experts to write articles and books that get their great ideas out into view where the community can use them, ideas that can move the C++ world along by having much the same impact as groundbreaking work like Loki.

Some of these things are already happening today. Others are things I’ll be working on over time. You should see the results progressively as I get settled in the role and we move forward to implement all of these things.

Q: What is the first mission on your agenda for the next 2-3 weeks?

A: To ramp and to get settled! Actually, I’m traveling at least two weeks of my first month on the job?speaking at the ACCU conference in England, and then attending the C++ standards meeting in Curacao. Both will let me touch base with important parts of the community?developers, and committee experts and authors?with my new hat on.

Q: What is your response to the claim that Microsoft’s decision to hire a renowned member of the C++ community is a PR stunt that is meant to attenuate the traditional antagonism towards Microsoft?

A: I’ve never heard that. The short answer is that I don’t take on jobs as PR stunts. Neither, I am sure, do people like Stan Lippman and Don Box. We’re at Microsoft because we’re excited about Microsoft’s C++ direction and about .NET.

The need for a flexible programming language that can handle everything from high-level abstraction to bit-twiddling, all unified within the same language, isn’t going away anytime soon.


Q: Considering Microsoft’s strong emphasis on C# these days, what is the role of C++ in their .NET Framework?

A: C++ continues to be the dominant language for most kinds of development on Windows. In the .NET world, C++ is still the best-performing language for most development work. The need for a flexible programming language that can handle everything from high-level abstraction to bit-twiddling, all unified within the same language, isn’t going away anytime soon. Other useful programming languages, including C#, will continue to be useful for the kinds of things they’re designed to do. I certainly hope that C# will be the destination of choice for a lot of today’s Visual Basic application developers. That would be quite a step forward. For systems programming, C++ is still tough to beat despite all the naysayers’ wishful thinking that C++ will just roll over and go away. Even in its first incarnation, Managed C++ is the best .NET programming language for creating efficient, performance-oriented applications, and Managed C++ will continue to be improved to increase its overlap with Standard C++.

For about six years now, certain vendors and many so-called industry experts have constantly predicted Java use to overtake C++ use “within two years.” It always seems to be “within two years,” for some reason. I first heard that kind of claim around 1996. Today, six years later, about 3 million of the approximately 9.5 million software developers worldwide use C++. Java still comes in a distant second or third at about 50 percent to 70 percent of the C++ developer numbers, depending on which study you look at.

What’s in Store for C++?
Q: It wouldn’t be an exaggeration to say that very little has been done to bring Visual C++ to full ANSI/ISO compliance since the release of Visual C++ 5.0 in 1997. However, Microsoft has recently announced its commitment to bring Visual C++ .NET into compliance with the C++98 standard. What is the cause of this change of heart? When will we have a fully standard-compliant version of Visual C++?

A: Microsoft definitely does intend to ship a fully standard-compliant version of Visual C++. It won’t all be in this next incremental release that we have in early beta right now, but the majority of the conformance improvements will be in there, including partial specialization. It’s certainly conformant enough that the most modern C++ community libraries, particularly Loki, Lamba and Boost, compile in-house without workarounds today. Few shipping compilers on any platform can do that?those libraries are well known as “compiler busters.” Only the strongest compilers can handle them correctly.

Q: Four years have passed since the ratification of the ANSI/ISO C++ standard. In retrospect, it seems that the standardization committee was sometimes hasty to accept dubious features. Namespaces, for instance, seem to be causing more trouble than benefit both to programmers and compiler writers. The new typecast notation, function try blocks, and exception specifications are other examples of such questionable features. Do you agree with this criticism? Are there other features in the C++ standard that you consider superfluous or ill-chosen?

A: I think that’s overstated. Besides, I doubt that a single programming language or software product?or electric toothbrush, for that matter?ever shipped that didn’t have superfluous or ill-chosen features in somebody’s opinion.

As I’ve written recently, it appears that today’s standard exception specifications aren’t very useful in practice (except possibly for the throws-nothing specification). Our experience with export, brief as it is, likewise seems to indicate that it’s a half-baked feature. At the very least, it’s a misunderstood feature. Export doesn’t deliver what most people who are anxiously awaiting it are expecting (to wit, export does not mean that you can ship template libraries without full template source code).

But why invent FUD about other features, like new-style casts? They’re genuinely useful, and I am not aware that anyone has ever questioned their utility. With regards to namespaces, I address this in the closing items of my most recent book, “More Exceptional C++.” Basically, I debunk the camp that urges programmers to always explicitly namespace-qualify all names because it’s bad advice offering little or no real advantage. It just creates useless typing overhead. After all, there’s nothing wrong with the liberal use of using-directives when there aren’t any name ambiguities, and why tell people to always manually resolve names even when there is no name collision to resolve? That doesn’t mean namespaces are broken. How else are you going to distinguish name collisions when two different libraries declare the same name, unless you’re willing to use namespaces or an equivalent disambiguation method? Clearly namespaces, new-style casts, and other such features offer important functionalities and solve real problems, both large and small.

Q: Standard C++ doesn’t support modern programming concepts such as multithreading, distributed computing, components, and persistence. The result is a plethora of proprietary libraries and platform-dependent frameworks that make cross-platform development in C++ nearly impossible. Is Standard C++ still relevant? Which features would you like to see added to the language in the future?

A: Again, these questions arise from an overstated premise. Thousands of companies are routinely writing and shipping cross-platform software written in C++. Claiming that it’s “nearly impossible” doesn’t change the fact that we’ve been doing it for years. The one big area I can think of where portability is genuinely difficult is one the question didn’t mention?GUIs. GUI portability is a problem in all languages, unless you give up writing rich GUIs and write only simple and limited ones. Interestingly, despite some languages’ attempts to “standardize” cross-platform GUI libraries, the best and most successful solution for cross-platform GUIs is not a code library at all, but HTML.

Thousands of companies are routinely writing and shipping cross-platform software written in C++. Claiming that it’s “nearly impossible” doesn’t change the fact that we’ve been doing it for years.

The services that these questions address are, of course, important. You can do all of these things whether there is a standardized syntax for them or not. I agree that a standard syntax would be nice and that’s why such things are on the hit list to be added for the next version of the C++ standard.

Q: What is your advice to new C++ programmers? In your opinion, are there other programming languages that C++ programmers should learn?

A: Always learn. Learn from the existing literature, C++ books and magazines and Web articles. They help you avoid reinventing well-known wheels. Learn different languages. They embody different ways of thinking. Learn different tools. They teach different ways of approaching problems. Most language zealots I’ve encountered think that their favorite language is the be-all and end-all, simply because they know few or no other languages. Know the various tools you have available to you, and you can do a much better job of selecting the right tools?plural, not singular?that will help you get your job done today.

devx-admin

devx-admin

Share the Post:
Bold Evolution

Intel’s Bold Comeback

Intel, a leading figure in the semiconductor industry, has underperformed in the stock market over the past five years, with shares dropping by 4% as

Semiconductor market

Semiconductor Slump: Rebound on the Horizon

In recent years, the semiconductor sector has faced a slump due to decreasing PC and smartphone sales, especially in 2022 and 2023. Nonetheless, as 2024

Learn Web Security

An Easy Way to Learn Web Security

The Web Security Academy has recently introduced new educational courses designed to offer a comprehensible and straightforward journey through the intricate realm of web security.

Military Drones Revolution

Military Drones: New Mobile Command Centers

The Air Force Special Operations Command (AFSOC) is currently working on a pioneering project that aims to transform MQ-9 Reaper drones into mobile command centers

Tech Partnership

US and Vietnam: The Next Tech Leaders?

The US and Vietnam have entered into a series of multi-billion-dollar business deals, marking a significant leap forward in their cooperation in vital sectors like

Bold Evolution

Intel’s Bold Comeback

Intel, a leading figure in the semiconductor industry, has underperformed in the stock market over the past five years, with shares dropping by 4% as opposed to the 176% return

Semiconductor market

Semiconductor Slump: Rebound on the Horizon

In recent years, the semiconductor sector has faced a slump due to decreasing PC and smartphone sales, especially in 2022 and 2023. Nonetheless, as 2024 approaches, the industry seems to

Elevated Content Deals

Elevate Your Content Creation with Amazing Deals

The latest Tech Deals cater to creators of different levels and budgets, featuring a variety of computer accessories and tools designed specifically for content creation. Enhance your technological setup with

Learn Web Security

An Easy Way to Learn Web Security

The Web Security Academy has recently introduced new educational courses designed to offer a comprehensible and straightforward journey through the intricate realm of web security. These carefully designed learning courses

Military Drones Revolution

Military Drones: New Mobile Command Centers

The Air Force Special Operations Command (AFSOC) is currently working on a pioneering project that aims to transform MQ-9 Reaper drones into mobile command centers to better manage smaller unmanned

Tech Partnership

US and Vietnam: The Next Tech Leaders?

The US and Vietnam have entered into a series of multi-billion-dollar business deals, marking a significant leap forward in their cooperation in vital sectors like artificial intelligence (AI), semiconductors, and

Huge Savings

Score Massive Savings on Portable Gaming

This week in tech bargains, a well-known firm has considerably reduced the price of its portable gaming device, cutting costs by as much as 20 percent, which matches the lowest

Cloudfare Protection

Unbreakable: Cloudflare One Data Protection Suite

Recently, Cloudflare introduced its One Data Protection Suite, an extensive collection of sophisticated security tools designed to protect data in various environments, including web, private, and SaaS applications. The suite

Drone Revolution

Cool Drone Tech Unveiled at London Event

At the DSEI defense event in London, Israeli defense firms exhibited cutting-edge drone technology featuring vertical-takeoff-and-landing (VTOL) abilities while launching two innovative systems that have already been acquired by clients.

2D Semiconductor Revolution

Disrupting Electronics with 2D Semiconductors

The rapid development in electronic devices has created an increasing demand for advanced semiconductors. While silicon has traditionally been the go-to material for such applications, it suffers from certain limitations.

Cisco Growth

Cisco Cuts Jobs To Optimize Growth

Tech giant Cisco Systems Inc. recently unveiled plans to reduce its workforce in two Californian cities, with the goal of optimizing the company’s cost structure. The company has decided to

FAA Authorization

FAA Approves Drone Deliveries

In a significant development for the US drone industry, drone delivery company Zipline has gained Federal Aviation Administration (FAA) authorization, permitting them to operate drones beyond the visual line of

Mortgage Rate Challenges

Prop-Tech Firms Face Mortgage Rate Challenges

The surge in mortgage rates and a subsequent decrease in home buying have presented challenges for prop-tech firms like Divvy Homes, a rent-to-own start-up company. With a previous valuation of

Lighthouse Updates

Microsoft 365 Lighthouse: Powerful Updates

Microsoft has introduced a new update to Microsoft 365 Lighthouse, which includes support for alerts and notifications. This update is designed to give Managed Service Providers (MSPs) increased control and

Website Lock

Mysterious Website Blockage Sparks Concern

Recently, visitors of a well-known resource website encountered a message blocking their access, resulting in disappointment and frustration among its users. While the reason for this limitation remains uncertain, specialists

AI Tool

Unleashing AI Power with Microsoft 365 Copilot

Microsoft has recently unveiled the initial list of Australian clients who will benefit from Microsoft 365 (M365) Copilot through the exclusive invitation-only global Early Access Program. Prominent organizations participating in

Microsoft Egnyte Collaboration

Microsoft and Egnyte Collaboration

Microsoft has revealed a collaboration with Egnyte, a prominent platform for content cooperation and governance, with the goal of improving real-time collaboration features within Microsoft 365 and Microsoft Teams. This

Best Laptops

Top Programming Laptops of 2023

In 2023, many developers prioritize finding the best laptop for programming, whether at home, in the workplace, or on the go. A high-performing, portable, and user-friendly laptop could significantly influence

Renaissance Gaming Magic

AI Unleashes A Gaming Renaissance

In recent times, artificial intelligence has achieved remarkable progress, with resources like ChatGPT becoming more sophisticated and readily available. Pietro Schirano, the design lead at Brex, has explored the capabilities

New Apple Watch

The New Apple Watch Ultra 2 is Awesome

Apple is making waves in the smartwatch market with the introduction of the highly anticipated Apple Watch Ultra 2. This revolutionary device promises exceptional performance, robust design, and a myriad

Truth Unveiling

Unveiling Truths in Bowen’s SMR Controversy

Tony Wood from the Grattan Institute has voiced his concerns over Climate and Energy Minister Chris Bowen’s critique of the Coalition’s support for small modular nuclear reactors (SMRs). Wood points

Avoiding Crisis

Racing to Defy Looming Financial Crisis

Chinese property developer Country Garden is facing a liquidity challenge as it approaches a deadline to pay $15 million in interest associated with an offshore bond. With a 30-day grace

Open-Source Development

Open-Source Software Development is King

The increasingly digital world has led to the emergence of open-source software as a critical factor in modern software development, with more than 70% of the infrastructure, products, and services

Home Savings

Sensational Savings on Smart Home Security

For a limited time only, Amazon is offering massive discounts on a variety of intelligent home devices, including products from its Ring security range. Running until October 2 or while

Apple Unleashed

A Deep Dive into the iPhone 15 Pro Max

Apple recently unveiled its groundbreaking iPhone 15 Pro and iPhone 15 Pro Max models, featuring a revolutionary design, extraordinary display technology, and unrivaled performance. These new models are the first