Andrei Alexandrescu

Last updated

Andrei Alexandrescu
AndreiAlexandrescu.jpg
Alexandrescu at ACCU 2009
Born1969 (age 5556)
Nationality Romanian, American [2]
Education Politehnica University of Bucharest and University of Washington
OccupationDeveloper of the D programming language
Employer(s)Netzip–RealNetworks
Facebook
Nvidia
Known forExpert on C++ and D programming [3]
Notable workBooks:
C++ Coding Standards
Modern C++ Design
The D Programming Language
Software libraries:
Loki, MOJO
SpouseSanda Alexandrescu
Website erdani.org

Tudor Andrei Cristian Alexandrescu [4] (born 1969) is a Romanian-American programmer and author specializing in the programming languages C++ and D. [3] He is especially 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 library MOJO. [5] He contributed to the C/C++ Users Journal under the byline "Generic<Programming>".

Contents

He became an American citizen in August 2014. [6]

Education and career

Alexandrescu received a Bachelor of Science (B.S.) degree in Electrical Engineering from Polytechnic University of Bucharest (Universitatea Politehnica din București) in July 1994. [7] [8]

In September 1998, his first article was published in the C/C++ Users Journal . From April 1999 until February 2000, he was a program manager for Netzip, Inc. When the company was acquired by RealNetworks, Inc., he served there as a development manager from February 2000 through September 2001. [7]

In 2001, Alexandrescu released the book Modern C++ Design , reviewed as one of the five most important C++ books by C++ expert Scott Meyers. [9]

In 2003, Alexandrescu earned a Master of Science (M.S.), and in 2009, a Doctor of Philosophy (Ph.D.) in computer science from the University of Washington. [10] [11] [12]

In 2006, Alexandrescu began assisting Walter Bright in developing the D programming language. [13] In May 2010, he released a book titled The D Programming Language.

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

Alexandrescu worked as a research scientist at Facebook for over 5 years, before leaving the firm in August 2015 to focus on developing the D language. [14]

In January 2022, Alexandrescu began working at Nvidia as a Principal Research Scientist. [15]

Contributions

The D programming language

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

Expected

Expected is a template class for C++ which is on the C++ Standards track. [16] [17] Alexandrescu proposes [18] 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 data types 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:

Example

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

intparseInt(conststring&);// Returns 0 on error and sets errno.

or

intparseInt(conststring&);// Throws invalid_input or overflow

he proposes the following:

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

Scope guard

From 2000 [19] onwards, Alexandrescu has advocated and popularized the scope guard idiom. He has introduced it as a language construct in D. [20] It has been implemented by others in many other languages. [21] [22]

Bibliography

References

  1. "Erdani.com".
  2. andralex (14 August 2014). "No". Reddit. Archived from the original on 16 June 2022.
  3. 1 2 Metz, Cade (7 July 2014). "The Next Big Programming Language You've Never Heard Of". Wired . Retrieved 27 July 2014. Today, Alexandrescu is a research scientist at Facebook, where he and a team of coders are using D to refashion small parts of the company's massive operation.
  4. "The D Language Foundation". dlang.org. Retrieved 5 June 2024.
  5. Alexandrescu, Andrei (1 February 2003). "Move Constructors". Dr. Dobb's Journal . Archived from the original on 7 May 2009. Retrieved 25 March 2009.
  6. "Sixteen years ago, at 28, I landed in New York with $300 to my name. Today I became a US citizen. It's been a wild ride that I hope will go on! : pics". 14 August 2014.
  7. 1 2 "Andrei Alexandrescu: Resumé". Archived from the original on 7 April 2011.
  8. ACCU Spring Conference 2001. Archived from the original on 11 August 2011.
  9. Meyers, Scott (9 August 2006). "The Most Important C++ Books...Ever". Artima. Retrieved 8 September 2025.
  10. "ACCU: Speakers". members.accu.org.
  11. "ACCU: Speakers". members.accu.org.
  12. Computer Science & Engineering, Recent Ph.D. Graduates (Summer 2009). mark University of Washington.
  13. "About Andrei Alexandrescu, PhD".
  14. "Moving forward with work on the D language and foundation". 25 August 2015. Retrieved 28 August 2015.
  15. "Andrei Alexandrescu". LinkedIn.com. Retrieved 15 December 2023.
  16. Botet; Talbot. "A proposal to add a utility class to represent expected monad" (PDF). Archived from the original (PDF) on 19 August 2014.
  17. "STD-make/P0323r2.md at master · viboes/STD-make". GitHub . 21 October 2021.
  18. Alexandrescu, Andrei. "Systematic Error Handling in C++". Archived from the original on 25 April 2013.
  19. Alexandrescu, Andrei; Marginean, Petru (1 December 2000). "Generic: Change the Way You Write Exception-Safe Code – Forever". Dr. Dobb's Journal . Archived from the original on 1 October 2012.
  20. "Exception Safety - D Programming Language". Dlang.org.
  21. "Scope::Guard - lexically-scoped resource management - metacpan.org". metacpan.org.
  22. "Scopeguard: Rust".