Template:Short description Template:Use dmy dates Template:BLP sources

Template:Infobox person

Tudor Andrei Cristian Alexandrescu<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref> (born 1969) is a Romanian-American C++ and D language<ref name="facebook.d"/> programmer and author. He is particularly known for his pioneering work on policy-based design implemented via template metaprogramming. These ideas are articulated in his book Modern C++ Design and were first implemented in his programming library, Loki. He also implemented the "move constructors" concept in his MOJO library.<ref name="movectors">{{#invoke:citation/CS1|citation |CitationClass=web }}</ref> He contributed to the C/C++ Users Journal under the byline "Generic<Programming>".

He became an American citizen in August 2014.<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref>

Education and careerEdit

Alexandrescu received a B.S. degree in Electrical Engineering from Polytechnic University of Bucharest (Universitatea Politehnica din București) in July 1994.<ref name="resume">{{#invoke:citation/CS1|citation |CitationClass=web }}</ref><ref>ACCU Spring Conference 2001 Template:Webarchive</ref>

His first article was published in the C/C++ Users Journal in September 1998. He was a program manager for Netzip, Inc. from April 1999 until February 2000. When the company was acquired by RealNetworks, Inc., he served there as a development manager from February 2000 through September 2001.<ref name="resume" />

Alexandrescu earned a M.S. (2003) and a PhD (2009) in computer science from the University of Washington.<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref><ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref><ref>Computer Science & Engineering, Recent Ph.D. Graduates (Summer 2009).mark University of Washington.</ref>

In 2006 Alexandrescu began assisting Walter Bright on the development of the D programming language.<ref name="bio">{{#invoke:citation/CS1|citation |CitationClass=web }}</ref> He released a book titled The D Programming Language in May 2010.

From 2010 to 2014, Alexandrescu, Herb Sutter, and Scott Meyers ran a small annual technical conference called C++ and Beyond.

Alexandrescu worked as a research scientist at Facebook for over 5 years, before departing the company in August 2015 in order to focus on developing the D programming language.<ref name="fbdeparture">{{#invoke:citation/CS1|citation |CitationClass=web }}</ref>

In January 2022, Alexandrescu began working at Nvidia as a Principal Research Scientist.<ref name="LinkedIn">{{#invoke:citation/CS1|citation |CitationClass=web }}</ref>

ContributionsEdit

The D Programming LanguageEdit

Along with Walter Bright, Andrei has been one of the two main designers of the D Programming Language, and the principal maintainer of the standard library Phobos from 2007 to 2019. He is the founder of the D Language Foundation. His contributions include the ranges module. He is the author of "The D Programmming Language" book.

ExpectedEdit

Expected is a template class for C++ which is on the C++ Standards track.<ref>[{{#invoke:citation/CS1|citation |CitationClass=web }}</ref><ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref> Alexandrescu proposes<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref> Expected<T> as a class for use as a return value which contains either a T or the exception preventing its creation, which is an improvement over use of either return codes or exceptions exclusively. Expected can be thought of as a restriction of sum (union) types or algebraic datatypes in various languages, e.g., Hope, or the more recent Haskell and Gallina; or of the error handling mechanism of Google's Go, or the Result type in Rust.

He explains the benefits of Expected<T> as:

  • Associates errors with computational goals
  • Naturally allows multiple exceptions in flight
  • Switch between "error handling" and "exception throwing" styles
  • Teleportation possible across thread boundaries, across nothrow subsystem boundaries and across time (save now, throw later)
  • Collect, group, combine exceptions

ExampleEdit

For example, instead of any of the following common function prototypes:

int parseInt(const string&); // Returns 0 on error and sets errno.

or

int parseInt(const string&); // Throws invalid_input or overflow

he proposes the following:

Expected<int> parseInt(const string&); // Returns an expected int: either an int or an exception

Scope guardEdit

From 2000<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref> onwards, Alexandrescu has advocated and popularized the scope guard idiom. He has introduced it as a language construct in D.<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref> It has been implemented by others in many other languages.<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref><ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref>

BibliographyEdit

ReferencesEdit

Template:Reflist

External linksEdit

Template:Facebook navbox Template:Authority control