<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 18 March 2014 06:37, Andrei Alexandrescu <span dir="ltr"><<a href="mailto:SeeWebsiteForEmail@erdani.org" target="_blank">SeeWebsiteForEmail@erdani.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">On 3/17/14, 9:10 AM, Manu wrote:<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">
On 18 March 2014 01:36, Andrei Alexandrescu<br></div>
<<a href="mailto:SeeWebsiteForEmail@erdani.org" target="_blank">SeeWebsiteForEmail@erdani.org</a> <mailto:<a href="mailto:SeeWebsiteForEmail@erdani.org" target="_blank">SeeWebsiteForEmail@<u></u>erdani.org</a>>><div class="">
<br>
wrote:<br>
<br>
<br>
    I'd like to see a solution to inlining along the lines of "pliz pliz<br>
    inline" (best effort) and "never inline".<br>
<br>
    Outlining only at a specific call site is seldom needed and when it<br>
    is it's trivially achievable with a noinline function forwarding to<br>
    the inline function. Inlining only at a specific call site is a tall<br>
    order and essentially impossible if header generation had been used.<br>
<br>
<br></div><div class="">
I don't follow, how does that work?<br>
It's the key innovation here. Since D doesn't have macros, I think it's<br>
something that really needs to be supported nicely.<br>
Obviously it's impossible if source is unavailable. It should give the<br>
same complaints that CTFE gives when source is unavailable.<br>
</div></blockquote>
<br>
The notion that a compiler can ask for any function to be inlined without the compiler having been "warned" in the function declaration makes me uncomfortable about feasibility.<br>
<br>
However, upon further thinking the same happens with CTFE.</blockquote><div><br></div><div>Exactly, we already have it in CTFE. It doesn't really add any new concept that D isn't already comfortable with.</div><div>
It can kinda be seen as sort of a type safe macro, which is a tool that D is lacking compared to C. I think the mixin keyword and concept makes perfect sense in this context. It feels quite intuitive to me.</div></div></div>
</div>