[nem-en] out / ref

Michal Moskal michal.moskal at gmail.com
Mon Sep 25 08:43:32 CEST 2006


On 9/24/06, Igor Tkachev <it at rsdn.ru> wrote:
> Hello devel-en,
>
> Example:
>
> Main() : void
> {
>   mutable n;
>   Foo(out n);
> }
>
> Foo(n : out int) : void
> {
>   n = 0;
> }
>
> Could we get support for the following:
>
> Main() : void
> {
>   Foo(_);
> }
>
> Sometimes out/ref value is not important and is ignored anyway.
> So, this way we could remove this junk from the code.

I like the idea, but this particular syntax is already used (Foo(_)
means x=>Foo(x)). Maybe Foo(out _) ?

I'm not sure though, if it wouldn't confuse people (that Foo(_) and
Foo(out _) are completely different things).

-- 
   Michał


More information about the devel-en mailing list