On Wednesday, 18 April 2012 at 21:07:08 UTC, Xan wrote:
Hi,

I want to know what is most interesting for me: delegates or functions. I consulted sources but none say the practical consequences of such election.

What can I do and what can't I do with functions and delegates?
Please, be didactics, I'm a newbee

Thanks,
Xan.

Well, function pointers can point to static functions, delegates cannot. Delegates can point to class/struct methods, function pointers cannot. Just use whichever is appropriate for your needs. To convert a function pointer to a delegate, call std.functional.toDelegate().

See http://dlang.org/function.html#closures

Reply via email to