-preview=in might break code

Ola Fosheim Grøstad ola.fosheim.grostad at gmail.com
Fri Oct 2 22:27:33 UTC 2020


On Friday, 2 October 2020 at 22:04:14 UTC, tsbockman wrote:
> On Friday, 2 October 2020 at 20:00:46 UTC, Ola Fosheim Grøstad 
> wrote:
>> Systems programming implies explicitness, this feature is the 
>> opposite.
>
> Systems programming requires explicit control to be 
> *available*. But, the programmer shouldn't be *forced* to 
> explicitly specify every tedious detail to get the desired 
> result.

Yes, but if you want passbyvalue for small structs all the time 
then you need to define enabling constraints as udefined 
behaviour.

The only viable alternative is to only get the optimization when 
it provably has the same effect.

Those are the only possible options (even in theory).



More information about the Digitalmars-d mailing list