Skip to main content
4 events
when toggle format what by license comment
Apr 27, 2015 at 1:36 comment added Jim Balter Rust follows point 1 -- no null at all. Ceylon follows point 2 -- non-null by default. References that can be null are explicitly declared with a union type that includes either a reference or null, but null can never be the value of a plain reference. As a result, the language is completely safe and there's no NullPointerException because it isn't semantically possible.
May 3, 2014 at 15:51 comment added supercat The List<T> is IMHO the best example, because it would require either that every T have a default value, that every item in the backing store be a Maybe<T> with an extra "isValid" field, even when T is a Maybe<U>, or that the code for the List<T> behave differently depending upon whether T is itself a nullable type. I would consider initialization of the T[] elements to a default value to be the least evil of those choices, but it of course means that the elements need to have a default value.
May 2, 2014 at 18:45 history edited CodesInChaos CC BY-SA 3.0
added 419 characters in body
May 2, 2014 at 18:39 history answered CodesInChaos CC BY-SA 3.0