[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: english names for symbolic SREs

This page is part of the web mail archives of SRFI 115 from before July 7th, 2015. The new archives for SRFI 115 contain all messages, not just those from before July 7th, 2015.

Alex Shinn scripsit:

> One final thing, do people prefer the 'non-greedy-' prefix
> or the 'lazy-' prefix?  What's actually happening is that in
> submatches which include the repetition, the semantics
> will switch from leftmost-longest match to leftmost-shortest,
> As far as I can tell "non-greedy" is a more common description,
> and I initially avoided "lazy" because it might be confused
> with lazy evaluation.  Java apparently calls them "reluctant."
> But lazy is the shortest.

I prefer "non-greedy", because it is the most common term.  Note that Java
has not only greedy and reluctant (= non-greedy), but also possessive
(notated *+, matches everything, never backtracks).  I have been unable
to see the use of this, however.

What has four pairs of pants, lives             John Cowan
in Philadelphia, and it never rains             http://www.ccil.org/~cowan
but it pours?                                   cowan@xxxxxxxx
        --Rufus T. Firefly