<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 14 December 2013 03:07, Dicebot <span dir="ltr"><<a href="mailto:public@dicebot.lv" target="_blank">public@dicebot.lv</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On Friday, 13 December 2013 at 17:01:21 UTC, Manu wrote:<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
On 14 December 2013 02:50, Dicebot <<a href="mailto:public@dicebot.lv" target="_blank">public@dicebot.lv</a>> wrote:<br>
<br>
</div><div><div class="h5"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Friday, 13 December 2013 at 16:28:33 UTC, Manu wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I could still REALLY do with __forceinline though. D doesn't have an<br>
effective macro.<br>
Obviously, if by 'language X' you mean 'any non-compiled language with<br>
pointers', then I totally agree! People who make claims like you say,<br>
don't<br>
generally know what they're talking about, or what C is actually used for.<br>
<br>
</blockquote>
<br>
I believe (and have posted it over 100 times in NG already :P) D<br>
absolutely needs either way to force internal linkage or good LTO symbol<br>
elimination. Without preprocessor there is not much you can do to eliminate<br>
code duplication other than templates / CTFE - and it bloats resulting<br>
executables damn lot, something that was very controllable in C.<br>
<br>
</blockquote>
<br></div></div><div class="im">
templates aren't guaranteed to inline, and they produce horrible symbol<br>
bloat. ctfe isn't inlining, it's pre-computation/runtime elimination.<br>
mixin is the closest, but it can't be used effectively in expressions, is<br>
horribly dangerous and generally horrible, and requires much keyword<br>
pollution.<br>
</div></blockquote>
<br>
What I mean is that right now symbols always make their way to object file, whenever they are inlined or not. So bloat is completely unaffected by inlining here. And spec currently kind of prevents removing those. One option could have been to fix `export` like <a href="http://wiki.dlang.org/DIP45" target="_blank">http://wiki.dlang.org/DIP45</a> proposes and get some kind of LTO. Simpler solution I personally would favor is to make template symbols internally linked by default and available only if explicitly aliased. But anything is really better than the current state.<br>
</blockquote><div><br></div><div>Ah I see what you mean. Yes, you are correct.</div><div>Any real embedded dev in the future will need to have these issues addressed as a matter of practicality.</div></div></div></div>