H1 2015 Priorities and Bare-Metal Programming

Walter Bright via Digitalmars-d digitalmars-d at puremagic.com
Mon Feb 2 15:29:01 PST 2015


On 2/2/2015 1:53 PM, Dicebot wrote:
>> http://wiki.dlang.org/DIP56
>
> Erm. Quoting the DIP: "If a pragma specifies always inline, whether or not the
> target function(s) are actually inlined is implementation defined, although the
> implementation will be expected to inline it if practical."
>
> This is exactly the absolutely unacceptable part that makes your DIP useless and
> last discussion has stalled (from my POV) exactly at the point where you refused
> to negotiate any compromises on that matter.

That interpretation is a little over the top. Any reasonable implementation is 
going to do what it can to inline when asked to - people who write compilers do 
not try to perversely interpret the spec in order to be as useless as possible. 
(After all, we are not writing the tax code!)

Now, when it can't inline, do you expect the compiler to produce an error 
message? If so, what corrective action is the user faced with:

    pragma(inline, some expression that determines the compiler version and 
evaluates to true only if this particular function can be inlined);

? Such will necessarily be brittle, and of dubious utility.



More information about the Digitalmars-d mailing list