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

Re: Defaulting params

Thread Previous | Thread Next
From:
Piers Cawley
Date:
April 11, 2002 10:42
Subject:
Re: Defaulting params
Message ID:
m27knenpqc.fsf@bofh.org.uk
Aaron Sherman <ajs@ajs.com> writes:

> 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?

If we're getting continuations then, where we're going we won't need
goto.



-- 
Piers

   "It is a truth universally acknowledged that a language in
    possession of a rich syntax must be in need of a rewrite."
         -- Jane Austen?


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