Sunday, January 18, 2009

Null-default and Null-safe operators

Today I've been having a look at Stephen Colebourne's proposal for null-handling in Java 7 (see this post for a summary).

I really like this proposal:
  • It is only syntax sugar, like many of the changes introduced in Java 5.
  • It really helps to reduce boilerplate code.
The main drawback I see is that heavily chained uses of the null-safe invocation operator may lead to some debugging knightmares (which invocation returned null?) unless some support is added to IDEs.

No comments: