Performance improvements for D / DMD compiler.

Walter Bright newshound at digitalmars.com
Sat Jan 20 08:57:51 PST 2007


Bill Baxter wrote:
> Walter Bright wrote:
>> Bill Baxter wrote:
>>> The question is how can we write functions in D that take big structs 
>>> as parameters in such a way that it is:
>>> A) efficient and
>>> B) guaranteed not to change the caller's value
>> There aren't const references in D. But the 3 ways to pass it by 
>> pointer are:
>>
>> 1) inout
>> 2) take the address and use a pointer
>> 3) make it a class instead
> 
> And none of those accomplishes a or b.

All of them accomplish A.



More information about the Digitalmars-d mailing list