Proposal: Elvis and Other Null-Safe Operators (original) (raw)

Neal Gafter neal at gafter.com
Thu Mar 19 07:13:43 PDT 2009


On Thu, Mar 19, 2009 at 1:26 AM, Jacek Kolodziejczyk <jacek.p.kolodziejczyk at gmail.com> wrote:

In my opinion the most obtrusive part in the current state of proposals is assumption that the invocation on null object should always return null. If I understand it correctly the following would break at runtime, because null cannot be assigned to boolean:

List list = null; boolean b = list?.isEmpty();

That would be a compile-time error because of the incompatibility between null and boolean.



More information about the coin-dev mailing list