----- 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}; Joe Gottman