It seems like in most mainstream programming languages, returning multiple values from a function is an extremely awkward thing.
The typical soluti
Pretty much all ML-influenced functional langues (which is most of them) also have great tuple support that makes this sort of thing trivial.
For C++ I like boost::tuple plus boost::tie (or std::tr1 if you have it)
typedef boost::tuple XYZ;
XYZ foo();
double x,y,z;
boost::tie(x,y,z) = foo();
or a less contrived example
MyMultimap::iterator lower,upper;
boost::tie(lower,upper) = some_map.equal_range(key);