Nullable types

Bent Rasmussen IncredibleShrinkingSphere at Gmail.com
Mon Oct 20 14:22:42 PDT 2008


Far more interesting that nullability of value types is non-nullability of 
reference types. The potential extinction of null-pointer exceptions. Spec# 
solves it, whether C# will solve it as well will be interesting to follow.

- Bent


"Lionello Lunesu" <lionello at lunesu.remove.com> skrev i meddelelsen 
news:gdhd0f$g3v$1 at digitalmars.com...
> 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