How to know whether to use function or delegate

Chad J gamerChad at _spamIsBad_gmail.com
Mon Jul 17 14:47:54 PDT 2006


Reiner Pope wrote:
> When making a program with a callback, how do you decide whether to use 
> a function or a delegate? E.g,
> 
>   void foo(void function(int) consume)
>   { ... }
> 
> or
> 
>   void foo(void delegate(int) consume)
>   { ... }

I started a thread along these lines not too long ago, and it had some 
good responses.

Here it is:
http://www.digitalmars.com/drn-bin/wwwnews?digitalmars.D.learn/3700



More information about the Digitalmars-d-learn mailing list