Multiple return values

Jonathan M Davis jmdavisProg at gmx.com
Tue Jan 3 16:24:02 PST 2012


On Tuesday, January 03, 2012 19:00:05 bearophile wrote:
> Jonathan M Davis:
> > I'm not saying that being able to return multiple values wouldn't be
> > nice, but in my experience, that's actually a very rare thing for
> > languages to be able to do - especially among C-based languages.
> 
> How do you count how rare is a feature need in languages that don't support
> that certain feature? I think you have no proof of what you are saying. On
> the contrary, the only evidence I see (looking at lot of real code written
> by other people), with languages that do offer multiple return values, like
> Python, Go and others, show that people do use this feature very often and
> appreciate it.

I'm not saying anything about the value of the feature. I'm just saying that 
given D's lineage, it's not at all suprising that it doesn't support multiple 
return values. In fact, it would be very abnormal if it did. The OP seems to 
expect that modern languages would support such a feature, whereas many do not 
- particularly the C-based ones.

Whether it would be worth having is an entirely different issue.

- Jonathan M Davis


More information about the Digitalmars-d mailing list