Pretty please: Named arguments
Andrej Mitrovic
andrej.mitrovich at gmail.com
Mon Feb 28 11:39:06 PST 2011
On 2/28/11, Jonathan M Davis <jmdavisProg at gmx.com> wrote:
> but if you're really passing around
> width
> and height much, then I'd argue that they should be put in a struct rather
> than
> passed around bare like that, and then that fixes the issue.
>
But then you're back to square one:
void foo(Size size) { }
struct Size { int width, height; }
void main() {
auto size = Size(10, 20); // so what is 10 and what is 20?
foo(size);
}
More information about the Digitalmars-d
mailing list