Re: RFC 138 (v1) Eliminate =~ operator.

2000-08-23 Thread Nathan Wiger
> : =~ has no real world equivalent, and in fact I don't know how to > : pronounce it in English so that $x =~ /a/ makes sense. > > Yes, that's all pretty much on the mark. Not true, IMO. In math, =~ is used to indicate "rough equivalence". (Actually, the ~ goes on top of the =, but this is a mi

working mnemonic for =~

2000-08-23 Thread David L. Nicol
Steve Fink wrote: > I couldn't for the life of me > remember whether it was ~= or =~. I've also observed one perl beginner > look up the symbol in a book every single time she needed it for a new > program. all the self-assignment operators are operator, then equal-sign. =~ is not a self-assig

Re: RFC 138 (v1) Eliminate =~ operator.

2000-08-23 Thread Damian Conway
> The mythical (and insistent) 'in' operator to rescue? I don't think so. "In" doesn't mean "matches". >$pattern in @expr any(@expr) =~ $pattern all(@expr) =~ $pattern >@pattern in $expr $expr =~ any(@pattern) $expr =~ all(@pattern) >@pattern in @expr any(@expr) =~

Re: RFC 138 (v1) Eliminate =~ operator.

2000-08-23 Thread Jarkko Hietaniemi
> Collected ideas (mostly not my own): > > EXPR /pattern/ > EXPR m/pattern/ > /pattern/ EXPR > m(EXPR)/pattern/ > /pattern/->(EXPR) > EXPR<-/pattern/ > EXPR<=/pattern/ > EXPR ~ /pattern/ > match(/pattern/, EXPR) > EXPR ? /pattern/ The mythical (and insistent) 'in' operator to rescue? $p

Re: RFC 138 (v1) Eliminate =~ operator.

2000-08-23 Thread Tom Christiansen
>But I agree that such examples would certainly make a better argument. >The only concrete thing I can come up with is that I and several other >perl coders I know had a lot of trouble remembering the =~ symbol. I've >been a very frequent perl user for about 8 years, and after I didn't use >perl f

Re: RFC 138 (v1) Eliminate =~ operator.

2000-08-23 Thread Steve Fink
Larry Wall wrote: > > The problem here is that I think =~ does one thing right--it brings the > "topic" out front. Hiding the variable to be modified clear out at the > end of a big regex is not going to be a winner. It's bad enough that > the /x modifier comes at the end. > > More generally,

Re: RFC 138 (v1) Eliminate =~ operator.

2000-08-23 Thread Larry Wall
Mark-Jason Dominus writes: : It may turn out that the new notation really does have exactly the : same ambiguities, but that's not clear to me now. All I said was that : I would like to see some discussion of it. Operator vs term processing would presumably treat any initial / as it does now (in

Re: RFC 138 (v1) Eliminate =~ operator.

2000-08-23 Thread Mark-Jason Dominus
> I'm not concerned about / being mistaken for division, since that > ambiguity already exists with bare /pat/ matches. Yes, but the current ambiguity is resolved from context in a rather complicated way. Nevertheless it turns out that Perl does the right thing in most cases. You are proposin

Re: RFC 138 (v1) Eliminate =~ operator.

2000-08-23 Thread Larry Wall
Steve Fink writes: : Despite all that, I don't have strong feelings about this RFC. I just : thought it would be an interesting idea to bring to Larry's eyes. Well, the fact is, I've been thinking about possible ways to get rid of =~ for some time now, so I certainly don't mind brainstorming in t

Re: RFC 138 (v1) Eliminate =~ operator.

2000-08-23 Thread Steve Fink
Mark-Jason Dominus wrote: > > It seems to me that there are at least two important things missing > from this proposal. > > 1. There is no substantive rationale presented for why the change >would be desirable. > > The only reasons you put forth are: > > * The syntax is ugly and unintuit

Summary of regex-related RFCs so far

2000-08-23 Thread Mark-Jason Dominus
Several RFCs have been issued that relate to regexes or pattern matching but which predate the perl6-language-regex list. I have asked the librarian to transfer ownership of these RFCs to this list. In the meantime, here is a summary of the outstanding regex-related RFCs: 72 (v1): The regexp en

Re: RFC 138 (v1) Eliminate =~ operator.

2000-08-23 Thread Mark-Jason Dominus
It seems to me that there are at least two important things missing from this proposal. 1. There is no substantive rationale presented for why the change would be desirable. The only reasons you put forth are: * The syntax is ugly and unintuitive. Ugliness is a matter of opinion, and I d