At 10:23 AM 1/12/2002 -0600, David M. Lloyd wrote:
>On Sat, 12 Jan 2002, Dan Sugalski wrote:
>
> > At 09:05 PM 1/11/2002 -0600, David M. Lloyd wrote:
> > >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)?
> >
> > So we could do:
> >
> >    @results = @foo ^=~ /bar/;
> >
> > Basically to allow hypermatches.
>
>Would that become something like this:
>
>@results = @foo.match(qr/bar/);
>
>where the 'match' method is called on the PerlArray object, or would it
>be more like:
>
>@results = map { $_.match(qr/bar/); } @foo;  # Forgive the mixed p5/p6
>
>where the match method is called on each element of @foo?

The former. The PerlArray object's perfectly justified in then calling 
match on each element inside itself.

                                        Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
[EMAIL PROTECTED]                         have teddy bears and even
                                      teddy bears get drunk

Reply via email to