A nice way to step into 2012

Manfred Nowak svv1999 at hotmail.com
Fri Dec 30 02:36:26 PST 2011


Andrei Alexandrescu wrote:

> is part of writing programs

If libraries from more than one author are used with named parameters, 
inconsistencies in the naming will be a normal problem.

For example: a boolean parameter for generating ouput might be named 
differently in two libraries as `print' (aka C) or `doWrite' (aka D).

Another: Directions in two dimensions be named `up, down, left, right' or 
`north, south, west, east'. 

Of course the positions for such parameters are also not fixed.

BTW: those who really want named (optional) parameters can already define 
their own,as   Gor pointed out in digitalmars.D:153790. The expenditures at 
the call are minimal, i.e `([' parantheses and restating the name of the 
function for every parameter:

|    f([ f.g= 1, f.h= 2 ]);  

-manfred


More information about the Digitalmars-d mailing list