DIP56 Provide pragma to control function inlining

Namespace rswhite4 at googlemail.com
Sun Feb 23 13:41:59 PST 2014


On Sunday, 23 February 2014 at 19:10:08 UTC, Namespace wrote:
> On Sunday, 23 February 2014 at 12:25:20 UTC, Benjamin Thaut 
> wrote:
>> Am 23.02.2014 13:07, schrieb Walter Bright:
>>> http://wiki.dlang.org/DIP56
>>>
>>> Manu has needed always inlining, and I've needed never 
>>> inlining. This
>>> DIP proposes a simple solution.
>>
>> Why a pragma? Can't we use a UDA and give it some special 
>> meaning inside the compiler?
>
> +1
> I would also prefer an attribute which can be used as label.
>
> ----
> @inline(true):
> // ...
> @inline(false):
> // ...
> @inline(default):
> ----

I still prefer the attribute/UDA idea but in case of pragma:

pragma(inline, true);
pragma(inline, false);
pragma(inline, default);

?


More information about the Digitalmars-d mailing list