Stroustrup: That's a good question. People have been predicting its demise quite enthusiastically for more than 20 years, but it's still growing. Basically, nothing that can handle complexity runs as fast as C++. If you go to some embedded areas, if you go to image processing, if you go to some telecom applications, if you go to some financial applications, C++ rules. You don't see it much if you're into looking at apps and such, that's not where you find it. It's things like Google, Amazon, search engines, where you really need performance, that's where it is.
InfoWorld:Google's Go language is getting attention lately. What's your perspective on Google Go?
Stroustrup: It seems to be one of these languages that can do a few things elegantly. [But languages] focused on doing those things elegantly lose the edge in performance and lose a little bit in generality. But of course, we have to see what happens.
InfoWorld: Some of these new scripting languages are intended for easy consumption by developers. Would you say C++ requires more attention than that?
Stroustrup: Oh, definitely. C++ is designed for fairly hardcore applications, and it's always been used together with some scripting language or other. When I started, I used C++ for anything that required a real programming language and real performance. Then I used the Unix shell as my scripting language. That was how it [was done], and that's also the way things are done in most of the cases today. [C++ is for] high performance, high reliability, small footprint, low energy consumption, all of these good things. I'm not saying hobbyists, I'm not saying quick apps. That's not our domain.
InfoWorld:Apple debuted its Swift language on June 2. Do you think the fact that it has Apple's backing it means it's going to be a significant language that developers are going to have to pay attention to?
Stroustrup: I think so. They paid attention to Objective-C, and now Swift is moving into that exact domain again.
InfoWorld: I'm looking at the blurb about an upcoming keynote you're presenting. It says, "C++ faces two challenges: helping programmers address the most demanding tasks in terms of performance, scale, and dependability. It also must help programmers be productive writing ordinary maintainable code." What can be done about these issues?
Stroustrup: I'm trying to explain the two things. One is to delve into efficient abstraction, efficient use of hardware, and the other one was simplifying writing new code, and with C++ 11 and C++ 14, there are some new facilities for that.
There's a new minor edition of the standard coming out this year, which is what we refer to as C++ 14. It's already shipping from Clang and GCC. The way I describe it is that C++14 is completing the work we did for C++ 11. When you are shipping a big product, which C++ 11 was, there are some things don't make it in just because you have to ship. And there's a few things you can't get right until you have everything put together and try it. And C++ 14 is [offering] things like that that didn't make it into C++ 11.
Instead of just the lambdas we had in C++ 11, we now have generic lambdas, and the lambdas can capture using move semantics, things like that. These are fairly technical things -- function, return, type deduction goes on just like for lambdas. The "constexpr" functions functions -- functions that you can do at compile time -- can now contain simple For loops. We have variable templates, there's improvements in memory initialization. There's user-defined literals.
InfoWorld: What about the issue of security in programming? Is there anything that developers need to do as far as securing their programs? Is C++ a more secure language than others?
Stroustrup: I'm a great fan of hardware to aid security. In terms of programming languages, if you want to write good programs, write your code type-safe. You can do that in C++. Don't mess around with low-level features all the time. And don't go to fully general interpreters where you can't track what is going on. Basically, security is a systems issue.
InfoWorld: Is there anything else you want to say about C++ or anything else in software development these days?
Stroustrup: We should aim for a greater degree of professionalism in software development. There are things in our society that musn't break, and most of them depend on software. And we need to consider our systems as a whole. Languages and their tool chains are part of it. We need to look into how we educate our developers and how we put emphasis on reliability.
This story, "Stroustrup: Why the 35-year-old C++ still dominates 'real' dev" was originally published by InfoWorld.
Paul Krill is an editor at large at InfoWorld, whose coverage focuses on application development.
- What does Oingo Boingo mean
- Why is SF Muni so unreliable
- What are Antifa myths
- Are sea urchins arthropods
- Is an unhealthy relationship worth it
- What food could you give up easily
- How can I become a secret agent
- How did Barry originally become the Flash
- What would happen if everyone recycled
- How do I emigrate to Iceland
- Do you feel at home in America
- Should the illiterate be debarred from voting
- Is Jack Reacher a credible character
- Have you experienced gun violence in California
- What does Bjarne Stroustrup think about Java
- Do lions eat hawks
- Are prepaid legal services worth the expense
- What are the best specializations for CSE