On Mon, Mar 15, 2004 at 08:36:23PM -0500, Joe Gottman wrote: : : ----- Original Message ----- : From: "Deborah Pickett" <[EMAIL PROTECTED]> : To: "Perl 6 Language" <[EMAIL PROTECTED]> : Sent: Sunday, March 14, 2004 10:44 PM : Subject: Re: Mutating methods : : : > On Sat, 13 Mar 2004 05.30, John Siracusa wrote: : > > The only case that seems even : > > remotely onerous is this one: : > > : > > my My::Big::Class::Name $obj = My::Big::Class::Name.new(); : > > vs. : > > my My::Big::Class::Name $obj .= new() : > : > There's also the related issue of in-place operations on some : > difficult-to-write lvalue: : > : > @{$coderef.("argument").{hashelem}} = : > sort @{$coderef.("argument").{hashelem}}; : > : > Did I get the text the same both times? What about maintaining that code? : > What about side effects on the subroutine I called there? : > : > Someone Damian-shaped will probably come in and point out how to prettify : that : > using "given", but it still wouldn't be as short as last week's : > : > $coderef.("argument").{hashelem}.self:sort(); : : : Why not just do : @{$_} = sort @{$_} given $coderef.("argument").{hashelem};
Er, let me guess. Because it still wouldn't be as short as last week's $coderef.("argument").{hashelem}.self:sort(); maybe? :-) My other guesses are: the end-weight problem, the forward reference on the multiple pronouns, the fact that you still need to recognize that the argument is the same as the result, or the general grottiness of @{$_} as a deref syntax compared to dot. Did I get it right? Larry