Tuples citizenship

deadalnix deadalnix at gmail.com
Fri Mar 2 01:27:02 PST 2012


Le 02/03/2012 00:09, Jonathan M Davis a écrit :
>
> When you're looking to mutate existing variables in the caller, using out
> parameters results in cleaner code.

I'd argue that not mutating parameter result in cleaner code most of the 
time.

> Tuples are inherently messier, because you
> have to deal with multiple return values. They also often do poorly when you
> need to use the functional programming, because often you want all of the
> return values for later use but only want to pass _one_ of them to the
> function that you're passing the result to.

The first time I encountered tuple was using Caml. This claim doesn't 
support my practical experience.


More information about the Digitalmars-d mailing list