Re: Learning delegates

2019-09-10 Thread Bert via Digitalmars-d-learn
On Sunday, 8 September 2019 at 10:04:57 UTC, Joel wrote: I'm trying to understand delegates. Is there any good ways I can get a better understanding of them? Simple, don't make it harder than it is. Delegates are basically functions... that is, function pointers(they point to some function

Re: Learning delegates

2019-09-09 Thread bachmeier via Digitalmars-d-learn
On Sunday, 8 September 2019 at 10:04:57 UTC, Joel wrote: I'm trying to understand delegates. Is there any good ways I can get a better understanding of them? I think this chapter should give you some useful information: http://www.ddili.org/ders/d.en/lambda.html

Re: Learning delegates

2019-09-08 Thread Rémy Mouëza via Digitalmars-d-learn
On Sunday, 8 September 2019 at 10:04:57 UTC, Joel wrote: I'm trying to understand delegates. Is there any good ways I can get a better understanding of them? I am no compiler implementer, so what is below may contain a lot of inaccuracies and conceptual shortcuts, but here is my view of

Re: Learning delegates

2019-09-08 Thread berni via Digitalmars-d-learn
On Sunday, 8 September 2019 at 10:04:57 UTC, Joel wrote: I'm trying to understand delegates. Is there any good ways I can get a better understanding of them? I wrote a foreach loop using opApply. A side effect of that was, that after I managed to do this I understood delegates. :-)

Re: Learning delegates

2019-09-08 Thread Max Samukha via Digitalmars-d-learn
On Sunday, 8 September 2019 at 10:04:57 UTC, Joel wrote: I'm trying to understand delegates. Is there any good ways I can get a better understanding of them? You may want to read this: https://tour.dlang.org/tour/en/basics/delegates

Learning delegates

2019-09-08 Thread Joel via Digitalmars-d-learn
I'm trying to understand delegates. Is there any good ways I can get a better understanding of them?