Bjarne Stroustrup On Why Learn C++
Written by Sue Gee   
Sunday, 20 October 2019

In a recent interview Bjarne Stroustrup advocates learning C++, the language he started to create while a PhD student in 1979. 

In recent years Stroustrup's achievement in developing the language he initially called "C with Classes" has been recognized by a string of awards, the most recent being 2018 Charles Stark Draper Prize for Engineering, see Prestigious Prize For Bjarne Stroustrup

C++ has always been an important and well-respected language. It maintained third place in the TIOBE index, behind Java and C, the language on which is was based, from 2001 when the index began until September 2018 when it was pushed into fourth position by Python. It briefly regained its traditional 3rd place this spring and is unlikely to go lower than 4th any time soon.

Over the years we've reported various interviews with Stroustrup that clarify the language's intent. This latest one is a conversation with Sonny Li and Mariel Frank, creators of Codecademy's new Learn C++ course on which Stroustrup provided feedback. 

bjinterview

Among the questions he answered was:

If you could go back in time and change one thing about the original implementation of C++, what would it be?

Stroustrup replied:

I don’t have a time machine and I shouldn’t try to second-guess 1983-vintage Bjarne—he knew the conditions at the time better than I do now, and any significant change probably wouldn’t have fitted in the 1MB memory I had to work with, and if it had maybe I wouldn’t have been able to port the compiler to an early 640MB Windows machine.

But if I could and if realities of compatibility didn’t get in the way, I’d like to eliminate the implicit narrowing and value-changing conversions. They are logically wrong and major sources of errors. For example:

badcpp

Asked about uses of C++ he talked about the range of applications it is used for:

from rice cookers to space rockets. It is humbling to realize that just about wherever you look there is C++ involved: cars, movies, games, medicine, finance, computers, farming, etc.

I find it most gratifying that C++ has been used in science: the human genome project, the fundamental physics research at CERN and elsewhere, and the Mars Rovers. It feels great to have made a contribution, however small.

Advocating learning C++ he said:

C++ is one of the most useful languages there is. That should be a sufficient reason. Someone wanting to be a professional should know a few languages—not just one—and C++ is a good one to know for work that requires performance and reliability.

Finishing with:

In my opinion, the best reason for learning C++ is that it gives you insights into a variety of programming and design techniques that are applicable in a wide variety of languages.

Learn C++ is a 20-hour course of eight lessons aimed at complete beginners. While it is free, additional content, including quizzes, portfolio-building projects and customized paths are available through Codecademy Pro. 

 stroustrup 155x207

More Information

Talking C++: An Interview with Bjarne Stroustrup

Learn C++ (Codecademy)

Related Articles

C++ Experiences Comeback In TIOBE Index

C++ 20 Feature List Finalized

Codecademy Introduces More Paid Options

Codecademy Adds Java For Beginners

Prestigious Prize For Bjarne Stroustrup

Bjarne Stroustrip Awarded IET Faraday Medal 

Bjarne Stroustrup Awarded Dahl-Nygaard Prize 

Bjarne Stroustrup Thinks He Has A Better Way To Do Generics

Towards Objects and Functions - Computer Languages In The 1980s

 

To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on Twitter, Facebook or Linkedin.

Banner


Low Cost ESP32 Drone On Kickstarter
22/09/2024

If you have been looking for an quadcopter that you can experiment with then you might well be interested in LiteWing. It uses an ESP32 to create a $60 drone.



Java Version 23 Released
30/09/2024

It was in April 2024 that we had Java 22. Now after just 6 months there's version 23, which is a STS release with lots of features in preview status.


More News

kotlin book

 

Comments




or email your comment to: comments@i-programmer.info

 

Last Updated ( Thursday, 24 October 2019 )