Windows experience is atrocious

Petar Petar
Mon Jul 31 07:44:43 UTC 2023


On Thursday, 27 July 2023 at 13:42:28 UTC, Steven Schveighoffer 
wrote:
> With preview=in behavior, whether the parameter is passed by 
> reference is decided by the compiler.

Yeah, that's perfect.

> `in ref` should just mean `in`.

I disagree. It should be `const scope ref` (i.e. arguments should 
always be passed by reference). The use case for "always" ref is 
matching the ABI of a third-party libraries or providing stable 
public ABI for the current project itself. There's plenty of old 
code that used `in ref` to mean `const [maybe scope(*)] ref`. 
Deprecating `in ref` caused a ton of unnecessary churn and I 
don't think we gained anything in the end. Allowing `in ref` is 
simpler (in terms of the effects it has on existing code) and 
more effective (supporting a (perhaps niche) use-case, that could 
otherwise be a blocker on the adoption of `-preview=in`).

(*) Since `scope` was implemented much later and not all safety 
checks were enabled without `-preview=dip1000`, there had been 
many instances where the function



More information about the Digitalmars-d mailing list