Pretty please: Named arguments

Bekenn leaveme at alone.com
Tue Mar 1 11:00:37 PST 2011


On 2/28/11 9:07 PM, Nick Sabalausky wrote:
> One could argue the code is more likely like this:
>
>      int x = 1;
>      int y = 2;
>      int width = 3;
>      int height = 4;
>      ...
>      box(x, y, width, height)

Right, at which point you're essentially using named arguments anyway, 
except that here, a) it's not verified by the compiler, b) you've added 
stack or static variables (perhaps needlessly), and c) you're polluting 
the local namespace.


More information about the Digitalmars-d mailing list