Just where has this language gone wrong?
Simen Kjaeraas
simen.kjaras at gmail.com
Mon Jul 23 14:14:05 PDT 2012
On Mon, 23 Jul 2012 22:51:19 +0200, Stuart <stugol at gmx.com> wrote:
> Saves us having to create a struct for every goddamn little function; or
> using tuples directly, which means we have to refer to variables like
> .value1 and .value2 instead of something meaningful.
You mean like this?
Tuple!(float, "x", float, "y") bar() {
return typeof(return)( 0.0, 0.0 );
}
auto xCoord = bar().x;
I dislike the typeof(return) in there, as assignment between tuples with
and without named fields works perfectly. Bring me the sky, Walter?
--
Simen
More information about the Digitalmars-d
mailing list