Damian Conway <[EMAIL PROTECTED]> writes:

> Piers wrote:
>
>> one could always handle the first case
>> more explicitly by doing:
>> 
>>    sub load_data ($filename; $version) {
>>       $version = 1 if @_.length < 2;
>>       ...
>>    }
>
> Err...no. If you specify named parameters, you don't get @_.
>
> It could be handled by overloading though:
>
>       sub load_data ($filename) { load_data($filename, 1) }
>
>       sub load_data ($filename, $version) {...}

Ooh. Multiple dispatch is definitely in then? Did I miss something?
But *great*.

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

Reply via email to