Member function pointers
David Nadlinger
code at klickverbot.at
Mon Jun 10 07:11:31 PDT 2013
On Monday, 10 June 2013 at 14:04:29 UTC, Manu wrote:
> On 10 June 2013 23:46, David Nadlinger <code at klickverbot.at>
>> 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?
Less intrusive in the way that it is a minimal addition to the
language itself (we already have several calling conventions),
whereas your suggestion would require adding a special case to
the grammar.
That's not to say I don't like your proposal, though. I just
wanted to put the option on the table to be sure we are getting
somewhere with this, even if some people might be opposed to the
grammar change. This issue has been bugging me for quite some
time as well.
> It feels a little hacky though. 'DThisCall' isn't really
> 'extern' so to speak.
extern(D) exists today – extern(xyz) should really be called
abi(xyz), callingconv(xyz) or something like that instead.
David
More information about the Digitalmars-d
mailing list