Andrei Alexandrescu Explained

Andrei Alexandrescu
Birth Place:Bucharest,[1] Romania
Nationality:Romanian, American[2]
Education:Politehnica University of Bucharest and University of Washington
Occupation:Developer of the D programming language
Known For:Expert on C++ and D programming[3]
Spouse:Sanda Alexandrescu

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

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

Education and career

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

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.[9] [10] [11]

In 2006 Alexandrescu began assisting Walter Bright on the development of the D programming language.[12] 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.[13]

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

Contributions

Expected

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

Example

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 guard

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

Bibliography

External links

Notes and References

  1. Web site: Erdani.com.
  2. Web site: No. . andralex . Reddit . 14 August 2014 . live . https://web.archive.org/web/20220616181240/https://www.reddit.com/r/pics/comments/2di6ik/sixteen_years_ago_at_28_i_landed_in_new_york_with/cjpvhon/ . Jun 16, 2022 .
  3. The Next Big Programming Language You've Never Heard Of. Metz. Cade. 7 July 2014. Wired. 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. Web site: The D Language Foundation . 2024-06-05 . dlang.org.
  5. Web site: Move Constructors . Alexandrescu . Andrei . 1 February 2003 . . 25 March 2009. https://web.archive.org/web/20090507104956/http://www.ddj.com/cpp/184403855. 7 May 2009 . live.
  6. Web site: 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. Web site: Andrei Alexandrescu: Resumé. https://web.archive.org/web/20110407082008/http://erdani.com/resume.html. dead. 7 April 2011.
  8. http://accu.informika.ru/events/public/accu0103.htm ACCU Spring Conference 2001
  9. Web site: ACCU :: Speakers. members.accu.org.
  10. Web site: ACCU :: Speakers. members.accu.org.
  11. https://cas01.cs.washington.edu/idp/profile/SAML2/Redirect/SSO?execution=e1s1 Computer Science & Engineering, Recent Ph.D. Graduates (Summer 2009)
  12. Web site: About Andrei Alexandrescu, PhD.
  13. Web site: Moving forward with work on the D language and foundation. 25 August 2015. 28 August 2015.
  14. Web site: Andrei Alexandrescu . LinkedIn.com . December 15, 2023.
  15. Web site: Botet. Talbot. A proposal to add a utility class to represent expected monad. dead. https://web.archive.org/web/20140819082937/http://www.hyc.io/boost/expected-proposal.pdf. 19 August 2014.
  16. Web site: STD-make/P0323r2.md at master · viboes/STD-make. GitHub. 21 October 2021.
  17. Web site: Alexandrescu. Systematic Error Handling in C++. dead. https://web.archive.org/web/20130425035429/http://channel9.msdn.com/Shows/Going+Deep/C-and-Beyond-2012-Andrei-Alexandrescu-Systematic-Error-Handling-in-C. 25 April 2013.
  18. Web site: Petru Marginean. Andrei Alexandrescu. Generic: Change the Way You Write Exception-Safe Code – Forever. live. https://web.archive.org/web/20121001132537/http://www.drdobbs.com/cpp/generic-change-the-way-you-write-excepti/184403758. 1 Oct 2012.
  19. Web site: Exception Safety - D Programming Language.
  20. Web site: Scope::Guard - lexically-scoped resource management - metacpan.org. metacpan.org.
  21. Web site: Scopeguard - Rust.