this is almost a workaround for the lack of named parameters

Jacob Carlborg doob at me.com
Fri Mar 22 00:28:04 PDT 2013


On 2013-03-21 22:18, bearophile wrote:

> You show code like:
>
> void foo ({ int x, int y } point)
> {
> }
>
> foo({ y: 5, x: 3 });
>
>
> D already has two kinds of tuples so I don't want a "third kind" of
> tuple. What I want is D to manage better the Phobos Tuple we already
> have, adding an unpacking syntax
> (http://forum.dlang.org/thread/gridjorxqlpoytuxwpsg@forum.dlang.org ).
> (This is not supposed to solve the named arguments problem).

This is not a tuple, it's an anonymous struct.

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list