<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 12 February 2014 12:55, Adam Wilson <span dir="ltr"><<a href="mailto:flyboynw@gmail.com" target="_blank">flyboynw@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5">On Tue, 11 Feb 2014 18:50:57 -0800, Daniel Murphy <<a href="mailto:yebbliesnospam@gmail.com" target="_blank">yebbliesnospam@gmail.com</a>> wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
"Adam Wilson"  wrote in message news:op.xa5d17y1707hn8@<u></u>invictus.hra.local...<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Awesome, I didn't know that. Does that mean we could add a switch for default linkage? That's good to know for reasons related to a couple of my D projects.<br>
</blockquote>
<br>
It could be done, although I'm not sure it's a good idea.<br>
</blockquote>
<br></div></div>
Why?<br>
<br>
Well, I was asking for the D-Core folks, if they could default the linkage to C++ then they could use classes without Object. And setting the default linkage might be useful for bindings.</blockquote><div><br></div><div>
It'll create linking problems if different modules refer to eachother, but happen to be compiled with different flags.</div><div>It would be better to use 'extern(C):' at the top of your module, then modules importing your module know what to expect.<br>
</div><div><br></div><div>extern(C++) classes are still GC allocated, so it's still not so simple. You'd need to start using emplace with manual allocation.</div></div></div></div>