The empty statement ";" - when is it useful?
Adam D. Ruppe
destructionator at gmail.com
Wed Jul 29 07:51:10 PDT 2009
On Wed, Jul 29, 2009 at 10:29:51AM -0400, Arthur Lloyd wrote:
> Also
>
> # struct coordinates { int x; int y; }
> # coordinates getThem() { coordinates c; c.x = 4; c.y = 5; return c; }
> # auto a = getThem();
>
> seems very verbose when in a scripting language I can do:
It also seems very verbose in D where you can do:
auto getThem() { return tuple(4,5); }
auto a = getThem;
--
Adam D. Ruppe
http://arsdnet.net
More information about the Digitalmars-d
mailing list