Andrei Alexandrescu (born 1969) is a Romanian-American C++ and D language 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. He contributed to the C/C++ Users Journal under the byline "Generic
Andrei Alexandrescu | |
---|---|
Born | 1969 (age 54–55) |
Nationality | Romanian, American |
Education | Politehnica University of Bucharest and University of Washington |
Occupation | Developer of the D programming language |
Known for | Expert on C++ and D programming |
Spouse | Sanda Alexandrescu |
Website | erdani |
He became an American citizen in August 2014.
Alexandrescu received a B.S. degree in Electrical Engineering from Polytechnic University of Bucharest (Universitatea Politehnica din București) in July 1994.
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.
Alexandrescu earned a M.S. (2003) and a PhD (2009) in computer science from the University of Washington.
In 2006 Alexandrescu began assisting Walter Bright on the development of the D programming language. 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.
In January 2022, Alexandrescu began working at Nvidia as a Principal Research Scientist.
Expected is a template class for C++ which is on the C++ Standards track. Alexandrescu proposes Expected
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
as:
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
From 2000 onwards, Alexandrescu has advocated and popularized the scope guard idiom. He has introduced it as a language construct in D. It has been implemented by others in many other languages.
This article uses material from the Wikipedia English article Andrei Alexandrescu, which is released under the Creative Commons Attribution-ShareAlike 3.0 license ("CC BY-SA 3.0"); additional terms may apply (view authors). Content is available under CC BY-SA 4.0 unless otherwise noted. Images, videos and audio are available under their respective licenses.
®Wikipedia is a registered trademark of the Wiki Foundation, Inc. Wiki English (DUHOCTRUNGQUOC.VN) is an independent company and has no affiliation with Wiki Foundation.