Member function pointers

Manu turkeyman at gmail.com
Fri Jun 7 16:57:40 PDT 2013


On 8 June 2013 09:48, Michel Fortin <michel.fortin at michelf.ca> wrote:

> On 2013-06-07 23:21:53 +0000, Manu <turkeyman at gmail.com> said:
>
>  Thoughts?
>>
>
> Reminds me of something similar I implemented a while ago:
> http://michelf.ca/projects/d-**objc/syntax/#selector-literals<http://michelf.ca/projects/d-objc/syntax/#selector-literals>
>
> Not only I think member function pointers are doable, but I think they're
> solely missing. There have been situations where I'd have used them but
> instead had to hack my way using a delegate. That was to build a bridge for
> Objective-C (before I decided to hack the compiler). I'd guess you're doing
> something of the sort too?


Precisely. The concept is already embedded inside of delegate, but delegate
is framed like a piece of magic, rather than a well defined compound of
more primitive pieces.
Those primitive pieces would be useful in certain cases (like mine, and
yours).

I think the only missing detail is a way to express a 'thiscall' function
pointer, which I believe my suggestion satisfies quite nicely.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20130608/295cbe9b/attachment.html>


More information about the Digitalmars-d mailing list