This seems to me to capture the essence of the behavior of lazy quantification.
The general usage of 'lazy' in the context of programming is: deferred or on-demand; with the complementary term being 'eager'.
I think that overloading lazy to mean non-greedy for this unique usage, just creates the potential for confusion and unreal expectations.
| [reply] |
... the context ...
But the context is a discussion of regex quantification, and what is the meaning of deferred or on-demand quantification?
I will make my last-ditch stand upon an appeal to authority: The Book* by Friedl, which uses "lazy" as the primary term for this quantification mode. And there you have it: Friedl said it; I believe it; that settles it!
* At least, the second edition of The Book. For some reason, I couldn't dig out my copy of the first edition, but I'm sure it uses the same terminology. I never bought the third edition. While preferring the term lazy, Friedl also acknowledges the terms "minimal matching", "non-greedy" and "ungreedy". I think I would use maximal/minimal matching in full-blown pedant mode (it is completely unambiguous WRT, e.g., deferred/on-demand/eager evaluation), but too cumbersome for everyday use; greedy/lazy for me. Ungreedy is just more Newspeak and so not to my taste.
Give a man a fish: <%-(-(-(-<
| [reply] [d/l] |
But the context is a discussion of regex quantification, and what is the meaning of deferred or on-demand quantification?
None. Which I why I wouldn't use it in that context. As I said above, it doesn't make sense in that context.
Friedl said it; I believe it; that settles it!
Two out three ain't bad! :)
| [reply] |