programming languages
@lizardsquid no null... what...
how do you say undefined, then?
how do you say return "I didn't find the number you wanted"?
programming languages
@Efi there's an option type!
it's either
Some(value)
or
None
so if your function needs to sometimes return nothing, you have to wrap it up in an option.
The point of this: you never get null pointer errors. Ever. Because the language knows if you forgot to check.
programming languages
@lizardsquid there's another way to not get null pointer errors: don't use pointers in user code
programming languages
@Efi sorry I didn't mean strictly pointers
you get the same problem in languages with null (or nil) but no pointers.