There are many people who think that the concept of the special value null
(as it is used in lanuages like C, Java, C#, Perl, Javascript, SQL etc.) is a bad idea. T
Here's an incomplete list of languages that are null-safe in the sense you described:
None
.nil
, but prevents all null pointer exceptions at compile-time.?
syntax.?
syntax.?
syntax.undefined
or null
as a variant.Maybe
.?
syntax.Option
.?
syntax.Option
.?
syntax.null
option
.Maybe
.option
.Feel free to complement the list. The year represents the first appearance according to Wikipedia.