[Python-Dev] Parrot -- should life imitate satire?

Nathan Torkington gnat@oreilly.com
Mon, 30 Jul 2001 20:08:47 -0700

Andrew Kuchling writes:
> If regex opcodes form part of the basic VM, would the main loop end up
> looking like the union of ceval.c and pypcre.c/_sre.c?  The thought is
> too ghastly to contemplate, though a little part of me [*] would like
> to see it.

(perl guy speaking alert) The plan for perl6 is to implement the
regular expression engine as opcodes.  We feel this would be cleaner
and faster than having the essentially separate module that we have
right now.  I think our current perl5 project manager was the one who
said that we have no idea how inefficient our current RE engine is,
because it's been "optimized" to the point where it's impossible to

The core loop would just be the usual opcode dispatch loop ("call the
function for the current operation, which returns the next
operation").  The only difference is that some of the opcodes would be
specific to RE matches.  (I'm unclear on how much special logic RE
opcodes involve--it may be possible to implement REs with the
operations that regular language features like loops and tests