Nullable types
Jesse Phillips
jessekphillips+D at gmail.com
Wed Jun 20 20:10:16 PDT 2012
On Wednesday, 20 June 2012 at 17:43:27 UTC, Mehrdad wrote:
> On Wednesday, 20 June 2012 at 16:52:26 UTC, bearophile wrote:
>> Mehrdad:
>>
>>> Would it be a good addition to Phobos? If not, ideas on what
>>> could be improved?
>>
>> What are the advantages over this one?
>> http://dlang.org/phobos/std_typecons.html#Nullable
>>
>> Bye,
>> bearophile
>
> I thought I mentioned?
>
> 1. It uses typeof(null) to _actually_ integrate with _null_,
> instead of making up methods like nullify(), get(), etc.
>
> 2. It tries to do what C# does. (opEquals, opCmp, etc.)
It sounds to me like you address some bugs in the existing
implementation, And possible poor design/limitation of the early
days.
You should probably add 2 as a bug report, then you could have a
pull request to address them.
Item 1 would be a breaking change, though in my limited view is
the right direction. It would not be good for a pull request to
address both 1 & 2 together. Unless of course you end up with
more feedback contradicting such claim.
More information about the Digitalmars-d
mailing list