Feedback Thread: DIP 1032--Function Pointer and Delegate Parameters...--Final Review
Walter Bright
newshound2 at digitalmars.com
Mon Aug 17 22:05:33 UTC 2020
This DIP came about because I ran into annoying instances in druntime/phobos
where pure functions were being passed pure delegates as parameters, but were
being rejected by the compiler because the parameter was un-attributed. I fixed
them, so it is not a surprise that phobos/druntime do not exhibit examples of
those issues.
I also anticipate this feature will be convenient for when `lazy` is eliminated
and arguments will be implicitly convertible to delegates.
The readability/writeability issue is more important than you suggest; people
don't like writing attribute soup. Things that preserve the value of attributes
while not requiring people to write them are good.
The downside of this proposal that most concerns me is the breaking of existing
code.
More information about the Digitalmars-d
mailing list