Questions on the new __traits(parameters)
Timon Gehr
timon.gehr at gmx.ch
Thu Mar 10 22:21:14 UTC 2022
On 10.03.22 13:57, Adam D Ruppe wrote:
> On Thursday, 10 March 2022 at 12:49:57 UTC, Paul Backus wrote:
>> handling correctly.
>
> objection, prejudiced language
>
Pardon? It's pretty clear that it should not behave this way. The point
of opApply is to overload on foreach syntax, where you can transparently
exchange the type of aggregate. This is a headache for generic code that
can loop either over an array or a struct with an opApply. There is zero
justification for the meaning of the foreach loop body to change based
on how the aggregate is expressed.
I guess __traits(parent, {}) and similar are also affected.
More information about the Digitalmars-d
mailing list