Buddha Buck writes: : 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(); I don't yet know whether built-in types will derive from UNIVERSAL. But certainly my sub foo { will work at least as well as it does now. :-) Larry
- RFC 127 (v1) Sane resolution to large function returns Perl6 RFC Librarian
- Re: RFC 127 (v1) Sane resolution to large functio... Nathan Wiger
- Re: RFC 127 (v1) Sane resolution to large functio... Nathan Torkington
- Re: RFC 127 (v1) Sane resolution to large fun... Dan Sugalski
- Re: RFC 127 (v1) Sane resolution to large... Larry Wall
- Re: RFC 127 (v1) Sane resolution to l... Buddha Buck
- Re: RFC 127 (v1) Sane resolution... Larry Wall
- Re: RFC 127 (v1) Sane resolution to l... Dan Sugalski
- Re: RFC 127 (v1) Sane resolution... Larry Wall
- Re: RFC 127 (v1) Sane resolu... Chaim Frenkel
- Re: RFC 127 (v1) Sane re... Larry Wall
- Re: RFC 127 (v1) Sane re... Chaim Frenkel
- Re: RFC 127 (v1) Sane re... Dan Sugalski
- Re: RFC 127 (v1) Sane re... Nick Ing-Simmons
- Re: RFC 127 (v1) Sane re... Chaim Frenkel
- Re: RFC 127 (v1) Sane re... Glenn Linderman
- Re: RFC 127 (v1) Sane re... Chaim Frenkel