I close BIP27. I won't be pursuing BIPs anymore

Namespace via Digitalmars-d digitalmars-d at puremagic.com
Thu Oct 20 04:08:16 PDT 2016


On Thursday, 20 October 2016 at 10:23:40 UTC, Ethan Watson wrote:
> On Wednesday, 19 October 2016 at 10:32:56 UTC, Walter Bright 
> wrote:
>> Better:
>>
>>    void f(ref Vector v);
>>    void f(Vector v) { f(v); }
>>
>>    f(Vector(10,20,30));
>
> Suitable enough for simple functions. But beyond that becomes 
> maintenance hell.
>
> For example:
>
> void func2( ref const( Vector ) v1, ref const( Vector ) v2 );

----
auto invoke(F, V...)(F f, V vs)
{
	return f(vs);
}

invoke(&func2, Vector(1, 2, 3), Vector(4, 5, 6));
----

One function to rule them all. :o






More information about the Digitalmars-d mailing list