Please change alias ReplaceArrayWithPointer = Flag!"replaceArrayWithPointer"

Ilya via Digitalmars-d digitalmars-d at puremagic.com
Fri Jan 22 14:00:10 PST 2016


On Friday, 22 January 2016 at 17:09:01 UTC, Jacob Carlborg wrote:
> On 2016-01-21 20:31, Andrei Alexandrescu wrote:
>> [...]
>
> Can we just implement a basic form of named parameters that 
> remove the ugly workaround that Flag is.
>
> void a(int x);
> a(x: 3); // error, cannot be called with named parameters
>
> void b(int x:);
> b(3); // ok
> b(x: 4); // ok
>
> void c(int x:, int y:);
> c(x: 3, y: 4); // ok
> c(y: 4, x: 4); // error, named parameters out of order
>
> The first error is to avoid making parameter names public API 
> by default. The second error is to not change how overloading 
> works.

DIP please! --Ilya


More information about the Digitalmars-d mailing list