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
- Re: A6: argument initializations via //=, ||=, ::= Michael Lazzaro
- Re: A6: argument initializations via //=, ||=, ::= Jonathan Scott Duff
- Re: A6: argument initializations via //=, ||=, ::= Damian Conway
- Re: A6: argument initializations via //=, ||=, ::= Matthijs van Duin
- Re: A6: argument initializations via //=, ||=, ::= Jonathan Scott Duff
- Re: A6: argument initializations via //=, ||=, ::= Damian Conway
- Re: A6: argument initializations via //=, ||=, ::= Jonathan Scott Duff
- Re: A6: argument initializations via //=, ||=, ::= Mark Biggar
- Re: A6: argument initializations via //=, ||=, ::= Michael Lazzaro
- Re: A6: argument initializations via //=, ||=, ::= Paul
- Re: A6: argument initializations via //=, ||=, ::= Damian Conway
- Re: A6: argument initializations via //=, ||=, ::= Paul
- Re: A6: argument initializations via //=, ||=, ::= Michael Lazzaro
- Re: A6: argument initializations via //=, ||=, ::= Damian Conway
- Re: A6: argument initializations via //=, ||=, ::= Michael Lazzaro
- Re: A6: argument initializations via //=, ||=, ::= Damian Conway
- Re: A6: argument initializations via //=, ||=, ::= Smylers
- Re: A6: argument initializations via //=, ||=, ::= Michael Lazzaro
- Re: is static? -- Question arcadi shehter
- Re: is static? -- Question Matthijs van Duin
- Re: is static? -- Question arcadi shehter