develooper Front page | perl.perl5.porters | Postings from April 2000

Re: PATCH: perlre.pod (against 5.6.0)

Thread Previous | Thread Next
Tom Christiansen
April 30, 2000 10:39
Re: PATCH: perlre.pod (against 5.6.0)
Message ID:
>I think I understand why you've added this new paragraph, but I'm not
>at all sure that it is the right thing to do - I think there is a
>danger that it will make it more difficult for the gentle reader
>later to understand how the backtracking mechanism (along with the
>combinatorial rules of a few simple operators) entirely determine
>which match is found. I have no replacement to offer, however.

I added it because people misunderstand greed.  They can't understand
why "greed" =~ /(e*)/ successfully finds no e's, and when you
explain, they fight with you because "it's not documented".  You
have to mention the supremacy of eagerness when you're doing greed,
and also explain that only quantifiers, not patterns, are greedy.
People aren't going to read the backtracking section; they just
aren't.  But they'll read what "*" does, though.


Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About