安德烈·亞歷山德雷斯庫

维基百科,自由的百科全书
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). 

外部链接[编辑]