Discussion Thread: DIP 1032--Function pointers and Delegate Parameters...--Community Review Round 1

Avrina avrina12309412342 at gmail.com
Fri Jul 31 13:16:28 UTC 2020


On Thursday, 30 July 2020 at 03:16:02 UTC, Walter Bright wrote:
> On 7/29/2020 4:26 AM, Dennis wrote:
>> How would you solve this if you were the library author?
>
> The usual way is with templates.

Did you even try his example code with templates? Or do you just 
give an answer without even trying to see if it will work? 
Sometimes it feels like you only program in D using a feature set 
that is more similar to C and you aren't aware of the actual 
problems with some of D features (cause you don't use them). Not 
surprising opApply() isn't used once in DMD's source.

Now sure DMD came from C, even though it's been written in D for 
quite a while. I searched the commits you have made in phobos. 
You've made a total of 6 commits that contain *changes* to a line 
that contained opApply. One was just a tab->spaces whitespace 
fix. Three were just changing attributes of existing opApply 
functions eg adding `scope`. One was just a comment change.

There wasn't a single commit where you used opApply on your own. 
So I'm not surprised you don't understand the problem. You 
probably literally have never used opApply, so obviously you have 
no awareness of the problems actual users have with the features 
involved.


More information about the Digitalmars-d mailing list