Nullable types

Lionello Lunesu lionello at lunesu.remove.com
Mon Oct 20 00:34:30 PDT 2008


Hi,

I'm getting more and more intrigued by the way Delight [1] and F# [2] handle 
nullable types: using the type-system to check for "nullness" the way it 
does for constness*. I haven't used either one of those two languages, but 
since having read about both systems, I can't help keeping a tag in my mind 
for each variable; "this one can be null", "this one can't be null"...

* Is there anybody with experience using this concept of nullness in F# or 
Delight?

* Are there any other languages with this concept?

* I personally think it would be nice for D too. Your opinions?

L.

PS. I have the feeling this also can be generalized, like the 
green-code-red-code system. It's like a compile-time tagging of variables, 
with some added syntactic sugar (the ?-token).

[1] http://delight.sourceforge.net/null.html
[2] http://research.microsoft.com/fsharp/manual/import-interop.aspx#Nullness 




More information about the Digitalmars-d mailing list