安德烈·亞歷山德雷斯庫

維基百科,自由的百科全書
Andrei Alexandrescu
2009年Alexandrescu參加ACCU
出生1969年(54—55歲)
羅馬尼亞社會主義共和國布加勒斯特[1]
居住地 美國
國籍 羅馬尼亞
 美國(2004年8月起)[2]
教育程度布加勒斯理工大學華盛頓大學
職業Facebook研究科學家
知名於C++D語言專家[3]
配偶Sanda Alexandrescu
網站erdani.org

安德烈·亞歷山德雷斯庫(英語:Andrei Alexandrescu,1969年),羅馬尼亞裔美國人C++D語言專家。

D語言2.0版本之後,他加入D語言核心開發團隊,是繼沃爾特·布萊特之後的最主要設計師。他撰寫了《D程式語言》一書,全面系統地介紹了D語言的設計和實現。

他因通過模版元程序設計實現基於政策設計的開創性成果而名聞遐邇。他撰寫了《現代C++設計》一書闡述了他的理念,首次在他編寫的程序庫Loki里加以實現。他在MOJO庫里實現了move constructors[4]

他目前在Facebook公司就職,擔任研究科學家。

他於2004年8月入美國國籍[5]

教育和職業[編輯]

亞歷山德雷斯庫1994年7月畢業於布加勒斯理工大學,獲得電子工程學士學位。[6][7]

1998年9月他在C/C++ Users Journal上首次發表文章。 從1999年4月至2000年2月在Netzip公司擔任程序經理。Netzip公司被RealNetworks公司後,他繼續任職到2001年9月。[6]

亞歷山德雷斯庫先後於2003年和2009年獲得美國華盛頓大學計算機科學碩士和博士學位 。[8][9][10]

近年來,他一直協助沃爾特·布萊特開發D語言,於2010年5月出版了《D語言程序設計》。

亞歷山德雷斯庫、Herb Sutter斯科特·邁爾斯英語Scott Meyers三人主持名為 C++ and Beyond的小型年度技術討論會議。

著作[編輯]

書籍

貢獻[編輯]

Expected 作為C++模版類納入Boost[11]。Alexandrescu 建議 [12]使用 Expected<T> 作為一個類用於返回值用來表示要麼包含一個類型T或者例外防止其被創建。這是對於要麼返回代碼要麼顯示調用例外的一項改進。Expected<T>有如下好處:

  • 關聯計算目標和錯誤關聯
  • 自然構成多種例外
  • 在錯誤處理和拋出例外兩種風格中切換
  • Teleportation possible across thread boundaries, across nothrow subsystem boundaries and across time (現在保存, 之後拋出)
  • 收集、集合和組合例外

例子[編輯]

他建議採用

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

來代替如下的函數聲明。

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

或者

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

參考文獻[編輯]

  1. ^ Erdani.com. [2015-04-10]. (原始內容存檔於2020-08-22). 
  2. ^ 存档副本. [2015-04-10]. (原始內容存檔於2020-09-03). 
  3. ^ Metz, Cade. The Next Big Programming Language You’ve Never Heard Of. Wired.com. Wired. 7 July 2014 [27 July 2014]. (原始內容存檔於2014-07-26). 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. ^ Alexandrescu, Andrei. Move Constructors. Dr. Dobbs Journal. 1 February 2003 [25 March 2009]. (原始內容存檔於2009年5月7日). 
  5. ^ Reddit.com: "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!". [2015-04-10]. (原始內容存檔於2020-09-03). 
  6. ^ 6.0 6.1 Andrei Alexandrescu: Resumé. [2015-04-10]. (原始內容存檔於2011-04-07). 
  7. ^ ACCU Spring Conference 2001. [2015-04-10]. (原始內容存檔於2011-08-11). 
  8. ^ ACCU 2008: Speakers. [2015-04-10]. (原始內容存檔於2020-08-15). 
  9. ^ ACCU 2010: Speakers. [2015-04-10]. (原始內容存檔於2020-08-07). 
  10. ^ Computer Science & Engineering, Recent Ph.D. Graduates (Summer 2009)頁面存檔備份,存於互聯網檔案館). University of Washington.
  11. ^ Botet; Talbot. A proposal to add a utility class to represent expected monad (PDF). [2015-04-10]. (原始內容 (PDF)存檔於2014-08-19). 
  12. ^ Alexandrescu. Systematic Error Handling in C++. [2015-04-10]. (原始內容存檔於2020-11-29). 

外部連結[編輯]