[nem-en] Operator ??

Michal Moskal michal.moskal at gmail.com
Sat Sep 23 08:53:14 CEST 2006


On 9/22/06, Ivan A Eryshov <ivan.eryshov at gmail.com> wrote:
>
> On 9/22/06, Michal Moskal wrote:
> >If C# 3.0 has it, I'm for including the macro mentioned by Ivan in the
> >standard library.
> >
> >As far as I understand it should also work with nullable types?
>
> Yes, this operator should work with nullable types too. Just today I had
> start write macro which is meet C# specification on '??' operator. I plan
> find some time and finish them tomorrow or day after tomorrow.

In fact I think that your macro (as it stands now) should work with
nullable types, because in C# 2.0 the expression foo != null would be
transformed to foo.HasValue if foo is of nullable type. Therefore
similar thing should also happen in Nemerle. I'm not sure how easy to
implement it though.

-- 
   Michał


More information about the devel-en mailing list