Keynote: Binding Rvalues to ref Parameters

Andrei Alexandrescu
May 10 @ 09:00

Duration: 50 minutes
Talk type: Keynote
Level: All
Slides: PDF


The mechanics of binding values to function parameters is a central concern in programming languages. In the D language, binding an unnamed temporary (rvalue) to a reference parameter is disallowed to avoid unintentional misuse. In C++ binding an rvalue to a reference to constant is allowed, but binds too tightly, a complication that ultimately motivated the introduction of rvalue references. In Rust binding is allowed but requires additional syntax on the call side, which hurts genericity and composition. How can we relax the rules in the D language such that meaningful cases are allowed while improving on the experience with other languages?

Speaker Bio:

Andrei Alexandrescu coined the colloquial term "modern C++" (adapted from his award-winning book Modern C++ Design), used today to describe a collection of important C++ styles and idioms. He is also the coauthor (with Herb Sutter) of C++ Coding Standards and the author of The D Programming Language book. With Walter Bright, Andrei co-designed many important features of D and authored a large part of D's standard library. His research on Machine Learning and Natural Language Processing completes a broad spectrum of expertise. Andrei holds a Ph.D. in Computer Science from the University of Washington and a B.Sc. in Electrical Engineering from University "Politehnica" Bucharest. He works with the D Language Foundation.