Re: RFC 170 (v1) Generalize =~ to a special-purpose assignment operator

[email protected] (Matthew Cline)
Newsgroups perl.perl6.language.regex
Message-ID <[email protected]>
On Tue, 29 Aug 2000, Nathan Wiger wrote:

> David Nicol and I were brainstorming offline, and came up with a cool
> extension: ~=. These new operator would do a similar thing to =~ as
> described by the RFC, only LEFT padding the args:
>
>     $stuff =~ dojunk(@args);   # $stuff = dojunk(@args, $stuff);
>     $stuff ~= dojunk(@args);   # $stuff = dojunk($stuff, @args);
>
> The position of the ~ tells you how args are filled in: if it's on the
> left, then they're filled in to the left. If they're on the right, then
> they're filled in to the right. Quite flexible, IMO.

This would be bad for someone reading the code, as it would take
extra concentration to tell a "~=" from a "=~"; right now, a
"=" with a "~", I just know what it is, without having to determine
the order.

-- 
Matthew Cline        | Suppose you were an idiot.  And suppose that
[email protected] | you were a member of Congress.  But I repeat
                     | myself.  -- Mark Twain
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.