4 ms·
This is Haskell esoterica, any value can set as undefined an equivalent value to null. However, you never see code using undefined as null since Maybe a is so m
by timclark 15y ago
This is Haskell esoterica, any value can set as undefined an equivalent value to null. However, you never see code using undefined as null since Maybe a is so much clearer.
- jganetsk 15y agoundefined and null are quite different. It's impossible to test for undefined. You cannot expect (x == undefined) to return true. It would result in exception, in fact. You can only safely make a value undefined if you guarantee it won't be used.