Pretty please: Named arguments

Andrej Mitrovic andrej.mitrovich at gmail.com
Mon Feb 28 05:29:54 PST 2011


On 2/28/11, Steven Schveighoffer <schveiguy at yahoo.com> wrote:
>
> In any case, your syntax for named arguments is not possible.  x = y is an
> expression, and can be used anywhere an expression can be used.
>

I agree. I'm thinking there would be more ambiguity with the Python syntax:

void foo(int value = 50) { }
void main() {
    int value = 20;
    foo(value=40); // does main.value change?
}


More information about the Digitalmars-d mailing list