Telgin wrote:I'd sort of like to see something like this implemented into the core language of C/C++...
Won't happen, as the statement already is legal (if somewhat nonsensical) C code, which would silently change its meaning if you'd extend the language in this way. Silent changes to perfectly good code are among the last things the standard committees will consider. Especially since there are
two accepted canon methods to do what you want - returning a structure, and using reference parameters.
Then again, there are other things even less needed or are more confusing. Multiple inheiretance for instance...
Java uses two different kinds of inheritance, distinguishing between base classes and interfaces. In C++, you can use pure virtual base classes to achieve exactly the same effect.
Keep in mind that C++ inherited more from C than just general syntax. It also inherited the approach that "the programmer knows what he's doing, so get out of the way"...