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

Walter Bright via Digitalmars-d digitalmars-d at puremagic.com
Wed Oct 19 03:16:20 PDT 2016


On 10/19/2016 2:11 AM, Ethan Watson wrote:
> On Wednesday, 19 October 2016 at 05:41:17 UTC, Manu wrote:
>> People just want to be able to do this:
>>
>>   void f(ref const(Vector) v);
>>
>>   f(v1 + v2);
>>
>> or:
>>
>>   f(Vector(10,20,30));
>>
>> That is all. The rval produces a temporary, and the temporary is passed to the
>> function.
>
> Probably worth pointing out that we laid it out exactly like this to Walter and
> Andrei at DConf, and how not having it made the Quantum Break animation code
> (all of which is 3D math) a pain to write thanks to having to define the
> temporary variables yourself. Especially when you're calling bound C++ functions
> and the programmers involved could compare it to C++ directly saying "Why can't
> we do this?"


   void f(ref Vector v);
   void fv(Vector v) { f(v); }

   fv(Vector(10,20,30));

fv gets inlined, so no overhead.


More information about the Digitalmars-d mailing list