
11/13/2020 C++ programming language: How it became the invisible foundation for everything, and what's next - TechRepublic C++ programming language: How it became the invisible foundation for everything, and what's next by Owen Hughes in Developer on November 12, 2020, 9:44 AM PST Powerful, flexible, complex: The origins of C++ date back 40 years, yet it remains one of the most widely used programming languages today. TechRepublic spoke to C++ creator, Bjarne Stroustrup, to find out why. (https://tr1.cbsistatic.com/hub/i/r/2020/11/06/50ed437b-103f-4127-b7de- 35e81e1885a0/resize/770x/5039b8cf4d9cc2db52344fa9bc1469f3/bjarne-stroustrup.jpg) Bjarne Stroustrup: "Evolution is necessary to meet the challenges of a changing world and to incorporate new ideas." Image: National Academy of Engineering C++'s origins date back to 1979, when Bjarne Stroustrup, the programming language's creator, first began work on the language that was then known as "C with Classes". The language was initially designed as an improvement on the C programming language that added features based on object-oriented programming. https://www.techrepublic.com/article/c-programming-language-how-it-became-the-invisible-foundation-for-everything-and-whats-next/?ftag=TRE684d531&bhid=4… 1/10 11/13/2020 C++ programming language: How it became the invisible foundation for everything, and what's next - TechRepublic Must-read developer content Top 5 programming languages web developers should learn (https://www.techrepublic.com/article/top-5- programming-languages-for-web-developers-to-learn/) Python overtakes Java to become the second-most popular programming language (https://www.techrepublic.com/article/python-overtakes-java-to-become-the-second-most-popular-programming-language/) 3 essential hiring kits for key developer jobs (https://www.techrepublic.com/article/3-essential-hiring-kits-for-key- developer-jobs/) Python: Cheat sheet (free PDF) (https://www.techrepublic.com/resource-library/downloads/python-programming- language-a-cheat-sheet-free-pdf/) "C++'s success was obviously a surprise," Stroustrup tells TechRepublic. "I see C++'s success as a function of its original design aims – efficient use of hardware, plus powerful abstraction mechanisms – and its careful evolution based on feedback from real-world use." Now the language is the one of the most popular with developers and underpins systems and services around the world. SEE: Python is eating the world: How one developer's side project became the hottest programming language on the planet (https://www.techrepublic.com/article/python-is-eating-the-world- how-one-developers-side-project-became-the-hottest-programming-language-on-the-planet/) (TechRepublic) "I wanted to build a multi-computer system with a communication system that could be either shared-memory or a network," Stroustrup explains. "My focus was on the software. I needed to write low-level, close-to-hardware code, such as memory managers, process schedulers, and device drivers to separate software components, so that they could be running on separate computers communicating in well-defined ways." No language of the time was up to the task, so Stroustrup committed himself to building something that was. "C with Classes combined C's ability to work close to the hardware with an efficient variant of Simula's classes for abstraction and code organization," he says. From fairly early on, Stroustrup realized he didn't have dictatorial control of the language. Whereas early work on C++ involved just him and a handful of colleagues at Bell Labs, this https://www.techrepublic.com/article/c-programming-language-how-it-became-the-invisible-foundation-for-everything-and-whats-next/?ftag=TRE684d531&bhid=4… 2/10 11/13/2020 C++ programming language: How it became the invisible foundation for everything, and what's next - TechRepublic ballooned to several dozen when efforts to standardize the language began. Today, there are around 400 members in C++'s standards committee, in addition to a wider community of users who follow and try to influence the language's direction. So how does one keep a programming language coherent given so much enthusiasm? "That's an opportunity and a huge problem," says Stroustrup. "The hardest part is to decide what's important and maintain a coherency. Once you know what you want, eventually, you find a good technical way of doing it." Remember the Vasa 1998 marked the year C++ was formally standardized and became a solid workhorse. By this point, C++ was one of the most commonly used programming languages in the world, a position it retains to this day. Yet it was the arrival of C++11 thirteen years later that laid the foundations for the language's future evolution, says Stroustrup. "C++11 made C++ feel like a new language," he says. "The type-safe support for concurrency was essential. C++11 supplied a dense web of mutually supporting features such as [constant expression] functions for compile-time computation, lambdas, automatic type deduction, and variadic templates." While C++11 introduced several new features and capabilities that made the language simpler, faster and more expressive, the language maintains its reputation for being difficult to master – a fact its creator readily attests to. "C++ is indeed complex, and it takes effort to learn to use it well," says Stroustrup. "Unfortunately, people don't just want simplicity, they what something impossible: a simpler language, with more features, and no breakage of their existing code." Stroustrup's answer to this "trilemma", as he calls it, is adding features that "make simple things simple to do" – for example, though generalization or direct support for common use cases – while also maintaining both compatibility and stability. That's easier said than done with a beast as large as C++, or any major programming language for that matter. One of the biggest challenges is reaching a consensus on deciding which new https://www.techrepublic.com/article/c-programming-language-how-it-became-the-invisible-foundation-for-everything-and-whats-next/?ftag=TRE684d531&bhid=4… 3/10 11/13/2020 C++ programming language: How it became the invisible foundation for everything, and what's next - TechRepublic features to adopt and omit, Stroustrup explains, which in itself takes a great deal of hard work, discussion, time and patience. SEE: Top 5 programming languages for systems admins to learn (free PDF) (https://www.techrepublic.com/resource-library/downloads/top-5-programming-languages-for-systems-admins-to- learn-free-pdf/) (TechRepublic) Even then, not all the good features can be taken onboard. "You must try to add only what really helps people and then only a few such things – because if we accepted every feature that would help someone, the language would sink under its own weight," he explains. Stroustrup refers to the Vasa, (https://www.stroustrup.com/P0977-remember-the-vasa.pdf) a grand 17th century Swedish battleship that sank in Stockholm harbor on its maiden voyage because of its poor design. "At the insistence of the King – the highest management – and against the better judgement of the technical people, it had been piled high with beautiful statues and great guns. Top heavy, it was overturned by a gust of wind. "I repeatedly talked and wrote about the Vasa as a caution to people enthusiastically wanting to improve C++ by adding features: remember the Vasa! So far, C++ hasn't tumbled over." His secret to keeping C++ afloat after all these years? "You start small, articulate fundamental principles, articulate long-term ideals, and develop based on feedback from real-world use." Indeed, C++ is still going strong more than 35 years after it first appeared on the scene. Today's C++ is far more powerful and expressive than the early C++. However, the original design remains visible, even to this day. "There are simple programs from the early years – 40 years ago – that would still run today," Stroustrup says. "Stability is an important feature for a language used for systems that have to work for decades. In fact, many of the early ideas became available only in C++20. I knew from the start that I couldn't build the ideal language, so I had to aim for gradual development – evolution. In fact, I did not believe in the idea of a perfect language – perfect for what? For whom?" https://www.techrepublic.com/article/c-programming-language-how-it-became-the-invisible-foundation-for-everything-and-whats-next/?ftag=TRE684d531&bhid=4… 4/10 11/13/2020 C++ programming language: How it became the invisible foundation for everything, and what's next - TechRepublic He adds: "Evolution is necessary to meet the challenges of a changing world and to incorporate new ideas." C++ in practice As of September 2020, C++ is the fourth most popular programming language globally behind C, Java and Python, (https://www.techrepublic.com/article/python-programming-language-a-cheat-sheet/) and – according to the latest TIOBE index – is also the fastest growing (https://www.techrepublic.com/article/c-is-now-the-fastest-growing-programming-language/). C++ is a general- purpose programming language favored by developers for its power and flexibility, which makes it ideal for operating systems, web browsers, search engines (including Google's), games, businesses applications and more. Stroustrup summarizes: "If you have a problem that requires efficient use of hardware and also to handle significant complexity, C++ is an obvious candidate. If you don't have both needs, either a low-level efficient language or a high-level wasteful language will do." SEE: C# designer Torgersen: Why the programming language is still so popular and where it's going next (https://www.techrepublic.com/article/c-designer-torgersen-why-the-programming-language-is- still-so-popular-and-where-its-going-next/) (TechRepublic) Yet even with its widespread popularity, Stroustrup notes that it is difficult to pinpoint exactly where C++ is used, and for what.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages10 Page
-
File Size-