in reply to Re: Re: Thoughts on some new operators for perl (6 or 7)
in thread Thoughts on some new operators for perl (6 or 7)
.= doesn't make sense for its new purpose
If you can't imagine a function for it, it automatically does not make sense?
It could very well become a mutator for objects. As $foo += 5 equals $foo = $foo + 5, $foo .= lc could equal $foo = $foo.lc. Especially for @foo.sort and @foo.=sort, this would be great to have.
I've been wanting mutating and non-mutating versions of builtins for a while now, and this seems to me a good way to do it.
See also Re: Re: What should be returned in scalar context?.
Does it make sense now?
Juerd # { site => 'juerd.nl', plp_site => 'plp.juerd.nl', do_not_use => 'spamtrap' }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Re: Re: Thoughts on some new operators for perl (6 or 7)
by hardburn (Abbot) on Mar 10, 2004 at 14:58 UTC | |
by Juerd (Abbot) on Mar 10, 2004 at 15:03 UTC | |
by hardburn (Abbot) on Mar 10, 2004 at 17:15 UTC | |
by Juerd (Abbot) on Mar 10, 2004 at 17:31 UTC | |
by hardburn (Abbot) on Mar 10, 2004 at 17:34 UTC | |
|
In Section
Meditations