[nem-en] Re: Re: Re: language shootout: cheap-concurrency (Dmitry
Ivankov)
Micky Latowicki
biosap at gmail.com
Wed May 9 01:50:16 CEST 2007
On 5/8/07, Kamil Skalski <kamil.skalski at gmail.com> wrote:
> Nice :)
Thanks.
> The only thing I could suggest would be to use single matching on pair
> of colors instead of double nested one:
>
> ...
> ---->
>
> me = match ((me, other))
> | (Blue, Red) => Color.Yellow
> | (Blue, _) =>Color.Red
> | (Red, Blue) =>Color.Yellow
> | (Red, _) =>Color.Blue
> ...
>
Neat, I didn't know nemerle can handle that. Except that when I tried
this, I got a MissingFieldException. See this snippet below.
Am I doing something wrong, or should this be reported as a bug?
Either way, I suppose it should go in Mantis, because even if I'm
doing something wrong, the error message isn't helpful.
/* running this program yields the following error:
Unhandled Exception: System.MissingFieldException: Field
'Nemerle.Builtins.Tuple`2.Field0' not found.
mono version: 1.2.3.1
ncc version: svn trunk 7626
*/
enum Color {
| Red
};
def _ = match ((Color.Red,Color.Red)) {
| (Red,Red) => Color.Red
| _ => Color.Red
}
More information about the devel-en
mailing list