Combining Delegate and Functions

Jarrett Billingsley jarrett.billingsley at gmail.com
Tue Jun 30 08:43:10 PDT 2009


On Tue, Jun 30, 2009 at 11:38 AM, Jesse
Phillips<jessekphillips at gmail.com> wrote:
> So looking at a post on StackOverflow about D gatchas:
> http://stackoverflow.com/questions/743319/why-isnt-the-d-language-picking-up/1059780#1059780
>
> "functions that form closures or are attached to objects (ie. methods) are not the same as regular functions, instead they are called delegates, and you must be aware of the differences."
>
> I seem to recall the distinction was going to be going away or minimized. Is this already done? Will it be going into D2?

Nothing's changed in that area.  Theoretically the compiler could
implicitly convert function pointers to delegates by creating thunks.
It shouldn't be *that* hard to implement..



More information about the Digitalmars-d mailing list