Re: RFC 98 (v1) context-based method overloading
[email protected] (Nathan Wiger) Mon, 14 Aug 2000 20:05:14 -0700
| Newsgroups | perl.perl6.language.subs |
|---|---|
| Message-ID | <[email protected]> |
> It will run faster, because it doesn't have to evaluate
> the want(). (97,98) doesn't invalidate the current way of doing
> things, it just gives a new way.
Seems like it would have to evaluate the want() either way. Either in
the sub prototype:
@ sub { } # want @
$ sub { } # want $
or in the sub body:
sub { want 'ARRAY' ? @array : $scalar }
I don't see a speed advantage. At least not enough to justify a whole
new sub syntax (with new core hooks, basically an embedded 'want', etc,
etc).
New features are cool, but not at the expense of bloat. I don't want a 5
MB Perl executable just for something that's already (more?) easily done
another way. :-)
-Nate