The idea is about allowing people to handle null object situation as easy as possible (here by new operator). And I agree with that since even before.
Discussion can be seen on:
Current (sample) implementation use '?.' as operator, but in my opinion '.?.' would be more appropriate, because '?' following directly by some name can be hardly noticed when we only inspect code. Example:
This attribute can be important for people who did not used to this operator.
Autoboxing issues
Most disputation about this operator connects with autoboxing issue where options are:
- Forbid autoboxing that is simple and should not bring any problems, as we still have if and (?:).
- Turn on autoboxing that can kill program efficiency and through exception.
- Turn on autoboxing only if object is a target.
- Add other operator to this one.
0 comments / komentarz(y):
Post a Comment