Comment #0 by qs.il.paperinik — 2024-06-12T07:49:43Z
I take issue with the fact that `opApply` has the signature `int opApply(int delegate(…))`. The `int` part makes little sense.
It would be preferable to have a type (defined in object.d) named `OpApplyResult` (which can be a wrapped `int`) and have `opApply` specified to be: `OpApplyResult opApply(OpApplyResult delegate(…))`
That makes clear that the result of the delegate is to be returned.
Comment #1 by qs.il.paperinik — 2024-06-12T08:55:13Z
One reason is – and this is why I tagged this issue with safe – that it is unsafe to violate the opApply protocol.
Comment #2 by robert.schadek — 2024-12-13T19:35:38Z