Newsgroups: perl.perl6.language
From: ju...@convolution.nl (Juerd)
Date: Wed, 10 Mar 2004 17:39:33 +0100
Local: Wed, Mar 10 2004 11:39 am
Subject: Mutating methods
Perlists,
In Perl 5, lc, lcfirst, quotemeta, uc and ucfirst don't mutate. I imagine these will all be methods in Perl 6: $foo.lc I'd like a mutating version of lc, and a non-mutating version of chomp. If there isn't already such a thing in the making, I hereby suggest to In other words: C<$foo.lc> would not mutate and C<$foo.=lc> would. $foo += 5 ===> $foo = $foo + 5 Makes sense to me. Especially for C<sort> it would be nice for something like this: @foo.sort # returns sorted copy versus @foo.=sort # sorts inline I think this syntax reads better than Ruby's exclamation point Please excuse me if this or something like this has already been taken Regards, Juerd You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||