Spec#, nullables and more

Jimmy Cao jcao219 at gmail.com
Fri Nov 5 14:45:14 PDT 2010


On Fri, Nov 5, 2010 at 4:31 PM, Denis Koroskin <2korden at gmail.com> wrote:

> On Fri, 05 Nov 2010 23:44:58 +0300, Walter Bright <
> newshound2 at digitalmars.com> wrote:
>
>>
>> To eliminate null pointers is the same as shooting the canary in your coal
>> mine because its twitter annoys you.
>>
>
> I'm tired of pointing out that NO ONE is talking about eliminating null
> pointers, but rather extending an existing type system to support non-nulls.
> Your hate towards non-nullables comes from misunderstanding of the concept.
>


I've been thinking of Vala while reading this thread and its ideas.
In Vala one puts a question-mark after a type to mark it as nullable, as all
types are non-nullable by default.
For instance, instance of T? can be of type T or null.
The idea is that D could have it, but the other way around.
Could there be support for explicitly specifying that an instance of T can
only be T, never null?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20101105/250c61f9/attachment.html>


More information about the Digitalmars-d mailing list