<div dir="ltr">On 11 June 2013 00:28, Michel Fortin <span dir="ltr"><<a href="mailto:michel.fortin@michelf.ca" target="_blank">michel.fortin@michelf.ca</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On 2013-06-10 14:11:31 +0000, "David Nadlinger" <<a href="mailto:code@klickverbot.at" target="_blank">code@klickverbot.at</a>> said:<br>

<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Monday, 10 June 2013 at 14:04:29 UTC, Manu wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On 10 June 2013 23:46, David Nadlinger <<a href="mailto:code@klickverbot.at" target="_blank">code@klickverbot.at</a>><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Another less intrusive option would be to just add extern(CppThisCall) and<br>
extern(DThisCall) or something along the lines, which would be specified to<br>
pass the first parameter as if it was a this pointer.<br>
</blockquote>
<br>
That would also do the business. Do you think that's less intrusive?<br>
</blockquote>
<br>
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.<br>
<br>
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.<br>

</blockquote>
<br></div>
It's inelegant, but it could work.<br>
<br>
I just find it sad that we have to use a different calling convention for member functions. I mean, it'd be much more elegant be if a member function could simply be called from a "void function(Object)" by supplying "this" as the first argument? Wouldn't it be better to adapt the ABI to fit the language rather than adapt the language to fit the ABI?</blockquote>
<div><br></div><div style>The ABI is the better part of half a century old...</div></div></div></div>