3 ms·
There is a story that one of the designers of Java was pushing very hard in favour of Java references being non-nullable by default. But Gosling rejected the id
by iman 16y ago
There is a story that one of the designers of Java was pushing very hard in favour of Java references being non-nullable by default. But Gosling rejected the idea claiming that it would be too confusing for programmers and it would kill any chances of Java achieving popularity.
Here is a relevant paper, "Non-null References by Default in Java: Alleviating the Nullity Annotation Burden":
http://www.springerlink.com/content/f197143t80671627/ http://www.springerlink.com/content/f197143t80671627/
"we conducted an empirical study of 5 open source projects (including the Eclipse 3.3 JDT Core) totaling over 700 KLOC. The results allow us to confirm that in Java programs, at least 2/3 of declarations of reference types are meant to be non-null, by design."
- masklinn 16y ago> There is a story that one of the designers of Java was pushing very hard in favour of Java references being non-nullable by default. But Gosling rejected the idea Is there a source for that? And has Gosling apologized to the world since then? (I mean Hoare apologized, Gosling should grovel and beg for forgiveness)
- iman 16y agoI don't have a source and I don't quite remember where I heard it. It's probably not true. Although this post from Lambda the Ultimate mentions a similar sentiment: http://lambda-the-ultimate.org/node/1905#comment-23217 http://lambda-the-ultimate.org/node/1905#comment-23217
- masklinn 16y agoIt's still a bit weird, I think: a lot of the migration to Java was from enterprise C++, and while C++ has null pointers it doesn't have null references. So that wouldn't have been much of a change.