DIP proposal: Enum parameters

Timon Gehr timon.gehr at gmx.ch
Sat Sep 24 00:21:37 UTC 2022


On 23.09.22 19:54, Paul Backus wrote:
> 
> * Similarity to `ref` is also a design smell. `ref` is badly designed, 
> and things like `auto ref` and `core.lifetime.forward` exist entirely to 
> work around its deficiencies. We should avoid making the same mistake 
> twice.

This is reasoning by analogy, and it is not really appropriate here. 
It's not the same: A non-ref parameter is always an lvalue, but a 
non-enum parameter is never a compile-time constant. You just don't have 
the same problems.


More information about the Digitalmars-d mailing list