Java中的null引用,超乎你想象_JAVA_编程开发_程序员俱乐部

中国优秀的程序员网站程序员频道CXYCLUB技术地图
热搜:
更多>>
 
您所在的位置: 程序员俱乐部 > 编程开发 > JAVA > Java中的null引用,超乎你想象

Java中的null引用,超乎你想象

 2014/3/29 3:52:14  yangshangchuan  程序员俱乐部  我要评论(0)
  • 摘要:In2009TonyHoare,oneofthegiantsofcomputerscience,wrote:Icallitmybillion-dollarmistake.Itwastheinventionofthenullreferencein1965.Atthattime,Iwasdesigningthefirstcomprehensivetypesystemforreferencesinanobjectorientedlanguage(ALGOLW)
  • 标签:Java

In 2009 Tony Hoare, one of the giants of computer science, wrote:

?

I call it my billion-dollar mistake.?It was the invention of the null reference in 1965. At that time, I was designing the first comprehensive type system for references in an object oriented language (ALGOL W). My goal was to ensure that all use of references should be absolutely safe, with checking performed automatically by the compiler. But I couldn't resist the temptation to put in a null reference, simply because it was so easy to implement. This has led to innumerable errors, vulnerabilities, and system crashes, which have probably caused a billion dollars of pain and damage in the last forty years.
?

参考资料:

1、Java 8 in Action Lambdas, Streams and Functional-style Programming(1.6节第4段)

2、What is null in Java?

上一篇: 如何控制项目进度和质量 下一篇: 没有下一篇了!
发表评论
用户名: 匿名