About structs and performant handling

deadalnix deadalnix at gmail.com
Tue Mar 12 01:53:33 PDT 2013


On Tuesday, 12 March 2013 at 08:21:50 UTC, Namespace wrote:
> I also think that we do not need 'inline' or 'register'. 
> Nowadays, compilers can really assess the situation much better 
> than we do.
>
>> I don't see any reason to not allow the compiler to do so and 
>> create copy on a per needed basis, by optimizing pass-by value 
>> into pass-by-reference when it can prove it doesn't change the 
>> semantic (see my thread on the topic, but modify it to apply 
>> the restriction to anything possibly aliased).
>>
>> For the same reason as inline and register, I do think the 
>> default behavior is to let the compiler choose what is the 
>> bast as long as it doesn't change the final behavior.
>
> I know your thread, I was one of the most active there. And I 
> liked the idea, provided such parameters must be still manually 
> denoted.

You never gave any rationale reason on that.


More information about the Digitalmars-d mailing list