I have a design question here. Why did we take the approach of having a
match method on every single vtable, instead of having a vtable for
regular expressions, and have regex be an object (like Perl 5)?
>From a Perl (6) perspective, it makes more sense to me:
# This:
$a =~ /$regex/;
# would be the same as this:
$regex.match($a);
This way I can have my own regex module:
use PCRE;
my $pcre = PCRE.new('^foo(\d+)');
$string =~ /$pcre/;
# same as:
$pcre.match($string);
And have races. :-)
I can't imagine that class designers would always remember to implement
the 'match' method on every class, and I also think that there really
isn't any logical way to match a non-string against a regular expression.
My proposed regular expression vtable methods would just stringify their
PMC arguments.
Does this make any sense to anyone?
- D
<[EMAIL PROTECTED]>