June 2014

Ref-qualifiers -- Andrzej KrzemieĊ„ski

The latest from the desk of Andrzej:

Ref-qualifiers

by Andrzej Krzemieński

From the article:

In this post I want to describe a small language feature added in C++11 that, although essential for full value semantics support, is often neglected in tutorials and in compiler implementations....

Overload 121 is now available

overload-121.PNGOverload 121 is now available. It contains the following C++-related articles, and more:

 

Overload 121

Stop the Constant Shouting

CONSTANTS often shout. Jonathan Wakely considers why this happens in C and what the alternatives are in C++.

Minimal Overhead for Multiple Interfaces

Using multiple interfaces can slow things down. Daniel Gutson and Pablo Oliva present an alternative.

Lang.NEXT Keynote: What -- If Anything -- Have We Learned from C++? -- Bjarne Stroustrup

Hot off the Channel 9 video press from last week's Lang.NEXT conference:

Lang.NEXT Keynote: What – if anything – have we learned from C++?

by Bjarne Stroustrup

What is the essence of C++? Why did it succeed despite its well-understood flaws? What lessons -- if any -- can be applied to newer languages?

Themes: Social and technical factors. Resource management. Generic programming. The importance of being inefficient. The importance of syntax. How (not) to specify a language. Standardization and compatibility. And no, I don't plan to condemn C++ -- it is still the best language around for a lot of things, and getting better. It just isn't anywhere near perfect (even of its kind) or the best at everything -- and was never claimed to be.

CppCon Program Preview, 2 of N -- Boris Kolpackov

cppcon-096.PNGMore CppCon 2014 accepted talks have just been announced, below. For past announcements about the conference program, see also CppCon Program Preview, 1 of N and CppCon 2104: Initial Partial Topics and Speakers.

Super Early Bird registration has sold out, but Early Bird registration is available until June 30.

CppCon Program Preview, 2 of N

by Boris Kolpackov

From the announcement:

Continuing with the program preview, the next set of accepted talks is below (summary first, abstracts following):

  • Andrei Alexandrescu: “Mo’ Hustle Mo’ Problems”
  • Andrew Sutton: “Generic Programming with Concepts Lite”
  • Marshall Clow: “Hardening Your Code”
  • Nate Kohl: “cppreference.com: Documenting C++ One Edit at a Time”
  • Kate Gregory, James McNellis: “Modernizing Legacy C++ Code”

Andrei Alexandrescu: “Mo’ Hustle Mo’ Problems"

Reasonably-written C++ code will be naturally fast. This is due to C++’s excellent low-penalty abstractions and a memory model close to the machine. However, a large category of applications have no boundaries on desired speed, meaning there’s no point of diminishing returns in making code faster. Better speed means less power consumed for the same work, more workload with the same data center expense, better features for the end user, more features for machine learning, better analytics, and more. Optimizing has always been an art, and in particular optimizing C++ on contemporary hardware has become a task of formidable complexity. This is because modern hardware has a few peculiarities about it that are not sufficiently understood and explored. This talk discusses a few such effects, and guides the attendee on how to navigate design and implementation options in search for better performance.

Speaker’s bio: Andrei Alexandrescu is a researcher, software engineer, and author. He wrote three best-selling books on programming (Modern C++ Design, C++ Coding Standards, and The D Programming Language) and numerous articles and papers on wide-ranging topics from programming to language design to Machine Learning to Natural Language Processing. Andrei holds a PhD in Computer Science from the University of Washington and a BS in Electrical Engineering from University “Politehnica” Bucharest. He works as a Research Scientist for Facebook.

Andrew Sutton: “Generic Programming with Concepts Lite"

In this talk, I will give an overview of the Concepts Lite language extension for C++ and present examples of its use in design and implementation of real-world generic libraries. Concepts Lite provides the ability for programmers to directly state constraints on template arguments as part of the template declaration. These constraints are predicates which determine whether or not a template argument can be used with that template. Constraints are checked by the compiler at the point of use, meaning that that effectively constrained generic libraries will not suffer from the usual problems of insane diagnostics. Libraries written using concepts will be far more readable and maintainable than the status quo. This talk will focus on generic programming, proposed language features, and their use in building real-world libraries. Concepts Lite is a forthcoming ISO Technical Specification (TS) aimed at publication alongside C++14. Concepts Lite is implemented in a branch of GCC, which will be made available to the audience for experiments and experience.

Speaker’s bio: Andrew Sutton is an assistant professor at the University of Akron in Ohio where he teaches and conducts research at the intersection of Software Engineering and Programming Languages. Dr. Sutton helped design and implemented the Concepts Lite proposal for the C++ programming language. He is also the author of the Origin C++ Libraries, an experimental collection of generic libraries that supports ideas and research for generic programming. Dr. Sutton had previously worked as a postdoctoral researcher at Texas A&M University where he worked with Bjarne Stroustrup and Gabriel Dos Reis on the design and implementation of language support for generic programming (i.e., Concepts Lite). He is a member of the C++ Standards Committee and Project Editor for the Concepts Lite Technical Specification. He graduated with a PhD in computer science from Kent State University in Ohio in 2010.

Marshall Clow: “Hardening Your Code"

Ok, you’ve written some code, and it seems to work. How can you be sure that it works? It’s a busy, complicated, dangerous world out there, and software has to work in lots of different environments. How can you gain confidence about your code? How can you make your code more reliable? There are a lot of techniques available to developers today; I’ll talk about several of them: Unit tests, static analysis, runtime analysis, fuzzing, decoding compiler warnings and probably others.

Speaker’s bio: Marshall is a long-time Boost participant. He is one of the moderators of the Boost-Users mailing list, and helps keep the Trac system running. Marshall is a principal engineer at Qualcomm, Inc. in San Diego. He is the author of the Boost.Algorithm library, maintains Boost.Array and Boost.StringAlgo, and is the leader of the Boost Community Maintenance team.

Nate Kohl: “cppreference.com: Documenting C++ One Edit at a Time"

How do you convert hundreds of pages of C++ standardese into a resource that is accessible to software engineers around the world? This talk will describe the process of building a community-run website that documents all of the nooks and dark corners of the C++ programming language. I’ll look back at the history of how C++ was defined, cover the current state of documentation, examine the pros and cons of running a fairly high-profile publicly-editable wiki, and try to guess at what the future holds.

Speaker’s bio: Nate Kohl is a software engineer at Google who enjoys herding cats.

Kate Gregory, James McNellis: “Modernizing Legacy C++ Code"

C++ is a programming language with a long, storied history spanning over three decades–four if one includes its C ancestry. The C++ language has undergone many changes during that time, compiler technology has advanced substantially, and computers today are very different from the computers of decades past. But despite all of these advances, there’s an awful lot of C++ code in use today that looks like it was written in the 1980s. In C++ some cases, the code was written in the 1980s and it’s still in use; in other cases, it’s recently-written code that just doesn’t use modern style. In this talk, we’ll discuss some of the problems with legacy code, and review some practical techniques for applying principles of modern C++ to gradually improve the quality of legacy code and improve maintainability and debuggability. We’ll show how some very small changes to code can yield huge benefits.

Speakers’ bio: Kate Gregory has been using C++ since before Microsoft had a C++ compiler. She writes, mentors, codes, and leads projects, in both C++ and .NET, especially for Windows 7 and 8. Kate is a Microsoft Regional Director, a Visual C++ MVP, and has written over a dozen books (the most recent on C++ AMP for Microsoft Press) and speaks at conferences and user groups around the world. Kate develops courses on C++, Visual Studio, and Windows programming for Pluralsight, founded the East of Toronto .NET Users group, and is a member of adjunct faculty at Trent University in Peterborough.

James McNellis is a senior engineer on the Microsoft Visual C++ team, where he is responsible for the Visual C++ C Runtime (CRT) and C Standard Library implementation. He was previously a member of the Microsoft Expression Blend team, developing the XAML designer tools for Windows 8 apps. Prior to joining Microsoft in 2010, he spent several years working on real-time 3-D simulation and robotics projects in the defense industry. James is a prolific contributor on the Stack Overflow programming Q&A website and occasionally writes for the Visual C++ Team Blog.