[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

re: define and set! with multiple-values

>    Concerning the use of multiple return values, I've always wondered
>    what is the difference concerning returning multiple values and returning
>    a list (or a collection class object). In other words can't the programmer
>    already control the return statements?

>Sure, but you could make the same argument and say that all functions 
>should be PASSED exactly one argument, since you can bundle up anything 
>you like in a list.  It certainly complicates implementations to 
>allow more than one argument to be passed to a function, but that's 
>a price we're willing to pay.  Those of us on the "multiple values 
>as continuations" bandwagon want the symmetry between calling and 

I see, so it's an issue of symmetry vs. asymmetry concerning calling
chains. There are implementations where one single parameter is allowed
to be passed (classical Mactoolbox PB calls), but those are usually
limitations based on the implementation (or variable argument use 
as with XCMD style standalone code).

So the ultimate issue is the culture, where C programmers happily accept
one return value, pointer or whatever, while the continuation people like
a more symmetric approach. Personally I think it's a question of experience
and learning, where the multiple values case could be suddenly something
useful, but from a practical point of view the need is not that earth

Anyway, that's my private opinion.