3 ms·
There is no major difference between a nullable type and a maybe - the big difference is between non-nullable types and maybe. If you have a maybe I in my ignor
by timclark 13y ago
There is no major difference between a nullable type and a maybe - the big difference is between non-nullable types and maybe. If you have a maybe I in my ignorance can assign a null to it, if you have a non-nullable type the compiler will prevent me from assigning a null to it.
- mhaymo 13y agoOk, so in a default non-nullable type system, nullable types are equivalent to maybes.
- pestaa 13y agoAs far as I can tell, you are right, although in my view maybes are one step ahead: they form a monad. (Not saying there's anything stopping you from doing the same thing with nullables, but still they're a slightly different concept.)