[nem-en] Re: match on specific parameter

Philippe Quesnel philippe.quesnel at gmail.com
Sun Jan 29 19:27:07 CET 2006


On 1/29/06, Kamil Skalski <kamil.skalski at gmail.com> wrote:
>
> 2006/1/29, Michal Moskal <michal.moskal at gmail.com>:
>
> The problem of single / multiple matching bothers be for a long time.
> Ocaml allows to
> "implicitly" match on one or more LAST parameters, maybe this is not
> as bad design as I thought some time ago.


yeah, I was just thinking about something like that.
but on the 1st parameters, seems more intuitive than going backwards from
the last ones.

tt( a, b, c )
 | (1, true) => ...
 | (-1, true) => ...
 | (0, false) => ...

would match on a & b ?
it could get complicated (compiler wise) when you factor in 'which params
inference' on top of type inference ??

it looks clean, but is it clear ? or too obscure...
just an idea
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /mailman/pipermail/devel-en/attachments/20060129/707b22e0/attachment-0001.html


More information about the devel-en mailing list