At 11:26 AM 8/23/00 -0700, Larry Wall wrote:

>I expect that we'll get more compile-time benefit from
>
>     my HASH sub foo {
>         ...
>     }
>
>     %bar = foo();

So how would you fill in the type in:

my TYPE sub foo {
   ...
   if (wanthash())   { return %bar;  }
   if (wantarray())  { return @baz;  )
   if (wantscalar()) { return $quux; };
}

$scalar = foo();
@array  = foo();
%hash   = foo();

>Larry

Reply via email to