Larry Wall wrote:

Can anyone think of a good reason not to topicalize the first arg
of ordinary subs these days?  Other than subtle encouragement toward
use of multis?  I suppose it also makes refactoring between subs and
methods more difficult in the case where you're adding an invocant,
though it actually makes it easier in the case where you're just
turning the first sub argument into an invocant because you realize
you've been writing C-style OO code...

I'm having a hard time coming up with good reasons why we don't

   s:g/<!before multi \s+> (sub|method) /{"single $1"}/;
   s:g/multi (sub|method) / $1 /;

And then have a "single" still be multi, just with a MMD distance of -Inf to everything.

-- Rod Adams


Reply via email to