develooper Front page | perl.perl6.language | Postings from April 2002

Re: Defaulting params

Thread Previous | Thread Next
From:
Aaron Sherman
Date:
April 11, 2002 06:32
Subject:
Re: Defaulting params
Message ID:
1018531942.20190.91.camel@pps
On Thu, 2002-04-11 at 00:47, Damian Conway wrote:

> 	sub load_data ($filename) { load_data($filename, 1) }
> 
> 	sub load_data ($filename, $version) {...}

Interesting. This brings goto to mind. Above, I could just assume that
inlining will happen, but what about goto? Obviously:

    sub load_data($filename) { goto &load_data }
    
would be ambiguous, and would throw away the (now lexical) $filename.

I can't see any way to usefully preserve the old new meaning of goto. Is
this a good thing?



Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About