Re: pbr vs multiple returns
Jason Gade wrote:
>
> I don't understand linking two separate concepts (pass by reference and
> multiple returns). Can you explain a little better how they are related?
Just two different techniques that can both be used to implement a generic pop
function that does two things, ie get top and modify stack.
Is that any clearer?
I have a gut feeling that multiple returns will prove much easier to implement
than pbr, and now I think of it, there seems little to stop
top=pop(*stack)
from being nothing more than syntactic sugar for
{top,stack}=pop(stack)
Regards,
Pete
|
Not Categorized, Please Help
|
|