[nem-en] Feature request: Matching !null
Kamil Skalski
kamil.skalski at gmail.com
Sun Jul 23 23:10:17 CEST 2006
Why introduce new syntax if this is possible now by:
def a = array ["aa", null, "bbv"];
foreach (x when x != null in a)
System.Console.WriteLine (x);
maybe 'x is !null' is a few letters shorter, but adding the countless
forms of syntax here and there simply confuse the user and is hard to
remember.
On 7/23/06, vc <vc at rsdn.ru> wrote:
> Often it is necessary to filter not null elements.
> Now it is necessary to do it as follows:
>
> def a = array["a", null, "b"];
>
> foreach (x in a)
> when (x != null)
> System.Console.WriteLine(x);
>
>
> It will be nice to extend pattern matching that it allows doing so:
>
> def a = array["a", null, "b"];
>
> foreach (x is !null in a)
> System.Console.WriteLine(x);
>
> Or:
>
> foreach (x is not null in a)
> System.Console.WriteLine(x);
>
> Vlad
>
>
> _______________________________________________
> https://nemerle.org/mailman/listinfo/devel-en
>
--
Kamil Skalski
http://nazgul.omega.pl
More information about the devel-en
mailing list