Mark Biggar wrote:

sub myprint(+$file is IO:File is rw ::= IO:STDOUT, [EMAIL PROTECTED]) {...}

Should be:


sub myprint([EMAIL PROTECTED], +$file is IO:File is rw ::= $*OUT) {...}


although maybe what I really want is := instead.

I suspect so. The binding of a parameter is most definitely run-time, so := seems to make better sense.


One *might* argue that ::= means that $file was *pre*-bound to $*OUT, and the binding is overridden whenever it is actually passed by name, but that then
prevents run-time computation of bound defaults. Unless you allow := as well.


However I still think we're probably multiplying entities unnecessarily.

Damian

Reply via email to