[nem-en] out / ref

Michal Moskal michal.moskal at gmail.com
Wed Sep 27 14:31:42 CEST 2006


On 9/27/06, Igor Tkachev <it at rsdn.ru> wrote:
> Hello Ivan,
>
> > Yes, thisis more clearly, but I insist that using same syntax
> > for absolutely different things - Foo(_) and Foo(out _).
> > I'll like this idea if these different things will have different
> > syntax. For example Foo(?) and Foo(out _) and vice versa.
>
> Wait a second! What about:
>
> Foo(_ : int) : void
> {
>   _ = "".Length;
>
>   match(some_list)
>   {
>     | [1, _]      => ()
>     | h :: _ :: t => ()
>     | _           => ()
>   }
> }
>
> All of this is different syntax. And BTW meaning of this is much
> closer to Foo(out _) than to Foo(_). Actually, that's the reason why I
> thought this syntax will be quite natural and very logical for
> Nemerle.

You're completely right. The problem is that we already have foo (3,
_). And I'm not quite sure we want to change it. Maybe we should,
however partial application seems to be much more frequent than out _
(maybe I havn't used API with "out" parameters much though).

OTOH now, when we have that "x => f (3, x)" notation it might not be
that useful.

Any suggestions what to use instead of _ in for partial application?

-- 
   Michał


More information about the devel-en mailing list