June 12, 2024 [Issue 24601] New: [next edition] Make opApply result opaque | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=24601 Issue ID: 24601 Summary: [next edition] Make opApply result opaque Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P1 Component: dmd Assignee: nobody@puremagic.com Reporter: qs.il.paperinik@gmail.com 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. -- |
Copyright © 1999-2021 by the D Language Foundation