[Top][All Lists]

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

Re: [PATCH 2/2] Add reference to the lack of "non-greedy" variants

From: Diogo F. S. Ramos
Subject: Re: [PATCH 2/2] Add reference to the lack of "non-greedy" variants
Date: Thu, 27 Mar 2014 00:46:03 -0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

> "Diogo F. S. Ramos" <address@hidden> writes:
>> While describing special characters, remind the reader that
>> "non-greedy" variants are not supported.  They might not be familiar
>> with POSIX extended regular expression and expect it to work.
> Going by that logic, might they not expect a lot more?  (Say, if all
> they know about regexps is PCRE, for example.)  Intuition says that it's
> enough to specify "POSIX extended regular expressions", because they're
> a very clearly defined type of regexp.  (Don't be fooled by the word
> "extended", POSIX rigorously defines a type of regexp called "extended
> regular expressions", aka ERE.)

The documentation is already pointing out that some characters are
special, so adding the "non-greedy" observation is not special in this
case and IMO it's an expected feature from regexps.

Your observation makes me think I didn't go far enough.  If users expect
Perl regexps, we should warn them that Guile's is not.

Ultimately, I think Guile should document its own regexp syntax.

These changes have been inspired by the article "Teach, Don't Tell" [1],
and its accompanying texts.  Someone posted it at #guile, but I can't
remember their name now, I'm sorry.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]