On Fri, Nov 15, 2013 at 5:44 PM, Evan Hanson <xxxxxx@thunktastic.com> wrote:
Hi,

After removing the string arguments from the submatch extraction
procedures, should the results of things like the following be
specified?

    (define s "abc")
    (define m (regexp-search "b" s))
    (regexp-match-submatch m 0) ; => "b"
    (string-set! s 1 #\B)
    (regexp-match-submatch m 0) ; => "b", "B", or undefined?

Chibi returns "B", which I also think is the better option since it's
simpler and probably more efficient, though "b" is arguably nicer for
the user. Either way, is it worth specifying one (even if that's just
"undefined")?

A very good point, I think we should explicitly
state this is undefined.

I had also been planning on noting that the
effects of mutating an SRE passed to `regexp'
is undefined.  The cost of making a full copy of
every compilation is too expensive, especially
when considering huge mutable Unicode char-sets.

-- 
Alex