DIP56 Provide pragma to control function inlining

Walter Bright newshound2 at digitalmars.com
Sun Feb 23 15:49:58 PST 2014


On 2/23/2014 3:00 PM, Dmitry Olshansky wrote:
> You actually going against yourself with this argument - for porting you
> typically suggest:
>
> version(OS1)
>   ...
> else version(OS2)
>   ...
> else
> static assert(0);

There's not much choice about that. I also suggest moving such code into 
separate modules.


> Your nice tired and true way of doing things is EQUALLY FRAGILE (if not more)
> and highly coupled to the compiler but only SILENTLY so.

That's very true. Do you suggest the compiler emit a list of what optimizations 
it did or did not do? What makes inlining special, as opposed to, say, 
enregistering particular variables?



More information about the Digitalmars-d mailing list