Home United States USA — software Bjarne Stroustrup mines generic programming for a better C++

Bjarne Stroustrup mines generic programming for a better C++

469
0
SHARE

NewsHubBjarne Stroustrup is on a mission to simplify generic programming.
In a recently published paper titled ” Concepts: The Future of Generic Programming ,” Stroustrup makes the case for concepts as a foundation for generic programming. In concepts, Stroustrup sees the solution to the interface specification problem that has long dogged C++, the language he founded more than 35 years ago.
“The way we write generic code today is simply too different from the way we write other code,” Stroustrup says.
Stroustrup defines generic programming as programming focused on design and implementation of general algorithms, with algorithms capable of accepting a variety of types. Generic programming can also be used to write efficient libraries. Stroustrup hopes to see his ideas come to fruition in C++ in fewer than three years. Concepts, Stroustrup believes, will greatly ease engineers’ ability to write efficient, reliable C++ code.
Currently an ISO technical specification, concepts provide well-specified interfaces to templates without runtime overhead. Concepts, Stroustrup writes, are intended to complete C++’s support for generic programming as initially envisioned. “The purpose of concepts is to fundamentally simplify and improve design. This leads to fewer bugs and clearer — often shorter — code.

Continue reading...