Nice post Oliver. I recently saw that Groovy as this feature built in:
http://groovy.codehaus.org/Operators#Operators-SafeNavigationOperator%28...

So your example would be:
product.?offering.?merchant.?name

Java's really the language that needs a better solution for this. I think a lot of Java programmers don't use null values because it's so hard to express the intended semantics without building your own type annotations and such. The proposal for Javascript where nullable types are different from non-nullable ones makes a lot of sense to me.

Reply

The content of this field is kept private and will not be shown publicly.
CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
10 + 2 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.