Dan Sugalski writes: : The core will already know. Especially if we add return types. : Whether this justifies exposing the information's for someone else to : judge, but the core will know what context something is in. This is for : optimization reasons. While it's straightforward enough to know that this : is a hash copy: : : %foo = %bar; : : which can be optimized, it's less easy to optimize this: : : sub foo { : my %hash; : %hash = (1..10000); : return %hash; : } : : %bar = foo(); : : without return knowing its argument's in list(hash) context. If we know : that, though, the function return can be quicker than it would be if we : flatten and reconstitute the hash. I expect that we'll get more compile-time benefit from my HASH sub foo { ... } %bar = foo(); 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