inlining or not inlining...

Walter Bright newshound2 at digitalmars.com
Thu Feb 10 22:35:34 PST 2011


Stewart Gordon wrote:
> On 09/02/2011 12:14, spir wrote:
>> Hello,
>>
>> Walter states that inline annotations are useless, since programmers 
>> cannot generally know
>> which function /should/ be inlined --depending on a variety of 
>> factors, inlining may in
>> fact be counter-productive.
> <snip>
> 
> I hate not being able to force functions to be inline.  A consequence is 
> that you can't fully interface certain APIs without an extra .lib over 
> what would be needed in C(++).

You cannot force inlining in C(++) either. The inline keyword is only a suggestion.

I'm not understanding your last comment that a .lib would be required. That's 
not correct, as since you're supplying the full source anyway (needed for 
inlining), just compile in that source from the command line. No lib step is needed.


More information about the Digitalmars-d mailing list