On Mon, Dec 18, 2000 at 02:43:14PM +0000, Nick Ing-Simmons wrote:
> David Mitchell <[EMAIL PROTECTED]> writes:
> >
> >Personally I feel that that string part of the SV API should include most
> >(if not all) string functions, including regex matching and substitution.

[list of potential string operations, long]

> operations we want to perform on it, then divide those into the ones
> which make sense to be "methods" (vtable entries) of string, 
> those that are part of string API, and those which are just ops messing 
> with strings.

It would scare me a lot if perl had multiple copies of the regex engine.
I would not be confident that matching on string type A would behave in
the same (transparently identical) way as on string type B if I knew that
they actually had different code to do the actual regex.
The 8 bit string constant "mediæval" might get transparently promoted to
another string class (eg UTF8) that had a different idea about what
the regex /[[:lower:]]/ should match.

> I would argue one does that by making the regex API more modular.

I thought that no-one here had dissented from the opinion that the
substitution part of regex could easily be re-expressed as a series
of substr operations.
This doesn't answer the real challenge which is matching.

Nicholas Clark

Reply via email to