develooper Front page | perl.perl6.language | Postings from June 2005

Re: When can I take given as read?

Thread Previous
Rod Adams
June 17, 2005 12:09
Re: When can I take given as read?
Message ID:
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

Thread Previous Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About