[nem-en] Operator ??
Michal Moskal
michal.moskal at gmail.com
Sat Sep 30 18:35:06 CEST 2006
On 9/29/06, Ivan A Eryshov <ivan.eryshov at gmail.com> wrote:
> Hi Michal,
>
> On 26/09/06, Michal Moskal <michal.moskal at gmail.com> wrote:
> > As a general remark, it might not be the best idea to follow each and
> > every rule. Especially that they are not designed with type inference
> > in mind.
>
> Ok. I skip rare cases and add option support. Here is the macro and testes:
Great!
> def toptNone = typeof (Nemerle.Core.option[_].None);
> def toptSome = typeof (Nemerle.Core.option[_].Some);
I think you also need to check for plain option[_] without None/Some.
You can use Some(1):option[int] in your tests and see what happens.
> | _ =>
> <[ if ($exprA != null) $exprA else $exprB ]>;
Another option here, is to delay macro execution when we have None as
hint of the first
expression.
But it's certainly fine as the first version! Please commit.
--
Michał
More information about the devel-en
mailing list