Member function pointers

Manu turkeyman at gmail.com
Mon Jun 10 07:04:20 PDT 2013


On 10 June 2013 23:46, David Nadlinger <code at klickverbot.at> wrote:

> On Friday, 7 June 2013 at 23:22:03 UTC, Manu wrote:
>
>> I think this makes good sense, because other than the choice of calling
>> convention, it really is just a 'function' in every other way.
>>
>
> Another less intrusive option would be to just add extern(CppThisCall) and
> extern(DThisCall) or something along the lines, which would be specified to
> pass the first parameter as if it was a this pointer.


That would also do the business. Do you think that's less intrusive?
It feels a little hacky though. 'DThisCall' isn't really 'extern' so to
speak.
I like my suggestion a lot more. Little details like, what would you name
the 'this' argument? You'll end up with conventions like 'void function(T
_this)', and that's a bit untrue because there isn't an argument named
'_this', it's called 'this' inside the method.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20130611/248f54c9/attachment.html>


More information about the Digitalmars-d mailing list