unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: "Diogo F. S. Ramos" <dfsr@riseup.net>
To: taylanbayirli@gmail.com (Taylan Ulrich "Bayırlı/Kammer")
Cc: guile-devel@gnu.org
Subject: Re: [PATCH 2/2] Add reference to the lack of "non-greedy" variants
Date: Thu, 27 Mar 2014 00:46:03 -0300	[thread overview]
Message-ID: <87ppl8b8xw.fsf@nebulosa.milkyway> (raw)
In-Reply-To: <87y4zwekh0.fsf@taylan.uni.cx> ("Taylan Ulrich \"Bayırlı/Kammer\""'s message of "Wed, 26 Mar 2014 22:08:43 +0100")

> "Diogo F. S. Ramos" <dfsr@riseup.net> 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.

[1]  http://stevelosh.com/blog/2013/09/teach-dont-tell/




  reply	other threads:[~2014-03-27  3:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-26  3:27 [PATCH 1/2] Remove link to Emacs' regexp syntax Diogo F. S. Ramos
2014-03-26  3:27 ` [PATCH 2/2] Add reference to the lack of "non-greedy" variants Diogo F. S. Ramos
2014-03-26 21:08   ` Taylan Ulrich Bayırlı/Kammer
2014-03-27  3:46     ` Diogo F. S. Ramos [this message]
2014-03-28 19:25       ` Taylan Ulrich Bayırlı/Kammer
2014-04-15 11:38         ` Diogo F. S. Ramos
2016-06-19 15:41   ` Andy Wingo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ppl8b8xw.fsf@nebulosa.milkyway \
    --to=dfsr@riseup.net \
    --cc=guile-devel@gnu.org \
    --cc=taylanbayirli@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).