If you could redesign Java today, what is that one thing you will change?

Answer by Kunjaan Chhetri:

Avoiding Null State, which Tony Hoare called his 'billion dollar mistake', would be a pretty high on my list.

Richard Cobbe summarizes the top 3 problems with null as:

1. the error messages produced by the run-time system upon misuses of null do not generally contain enough information to help programmers find and fix the underlying bugs.

2. although there may be many invariants about how null flows through a program, programmers cannot state these invariants in the language itself, so they must assume all the effort of checking and enforcing them.

3. representing missing values and results with null is sometimes ambiguous, and this ambiguity leads to unnecessarily
complicated interfaces and the potential for subtle bugs.

Reference:
http://www.infoq.com/presentations/Null-References-The-Billion-Dollar-Mistake-Tony-Hoare/

Much Ado About Nothing: Putting Java's Null in its Place. A dissertation presented by. Richard Cobbe

If you could redesign Java today, what is that one thing you will change?

Advertisements

Leave a comment

Filed under Life

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s