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:
> I've kept most IrRegex extensions, but made many of the non-POSIX
> ones optional, designated by the regexp-extended feature, and backref
> specifically gets its own feature regexp-backrefs.
This troubles me. It leaves things too much up to the implementation,
and not enough flexibility for the user. These extensions work only if
you have a backtracking NFA, which is inherently less efficient. In
order to provide both efficiency and power, the implementation would
have to provide both an NFA (to be used in the general case) and a DFA
or Thompson-NFA (to be used if the extensions are not needed). This is
what Perl does, but Perl is a rag-bag by nature.
I'd say: leave these things out of the main library, but add another
library that provides them but using the same API. This way, the user
can load (srfi 115) or (srfi 115 extended) and get the most suitable
engine. Of course, they can be the same engine if the implementer
doesn't care that much about speed. If the user needs to load both,
using the R6RS/R7RS prefix feature makes both APIs available.
> regexp->sre is frequently requested in IrRegex. It is useful and the
> only argument against it is that it would require more memory for
> compiled regexps (linearly more for most implementations), but I'll
> wait to see if it's requested in the discussion.
I think it's an important thing to have. The wording should allow for
either caching within the regexp object or decompilation, and should
warn that caching may produce a space leak.