On Thu, Jan 31, 2002 at 05:15:49PM +0000, Graham Barr wrote:
> 
> Yes, I was assuming that. However what is to be gained by case
> folding the input string ?
> 
> Because parts of an rx can be case-insensitive while other parts
> are case-sensitive, we will probably need two sorts of ops anyway
> (or a way to tell the op to be case-insensitive).  And you will
> only be able to do the case folding when the whole rx is case-insensitive.

(Two sorts of ops makes most sense to me as the case-insensitive op
will need to know about fiddly charset conversion stuff whereas the
case-sensitive can just work with the list-of-integers abstraction.)

> It also means creating a copy of the input string, which is something
> the current rx engine in perl5 tries to avoid. And while I will agree
> that it is often faster todo lc($str) =~ /.../ than $str =~ /.../i
> that is normally only the case for small-ish strings.

Agreed on all counts.

Especially as the perl6 rx engine will have to be able to work directly on
non-trivial things like streams and generators ans suchlike.

Tim [who's not really paying attention].

Reply via email to