CTFE and DI: The Crossroads of D
Era Scarecrow
rtcvb32 at yahoo.com
Wed May 9 21:01:27 PDT 2012
On Thursday, 10 May 2012 at 03:17:20 UTC, Michaël Larouche wrote:
> On Thursday, 10 May 2012 at 02:59:22 UTC, Andrei Alexandrescu
>> @inline anyone?
>
> I find the @inline confusing, people could mistook it with a
> force inline attribute.
> Something like @compiletime would be more clear for the tool
> and the user.
I know I have some functions that are used only during
comile-time, specifically ones that generate code for me when
using mixins. Seems useless to me to compile and keep functions
that aren't used in actual Run-time..
Either way, a @compiltime or @CT @CTFE would be a good label for
it not to be stripped...
And I agree, inline suggests it's forced, half the time I've
read, forcing in-lining is usually self-defeating since the
compiler in C/C++ will auto inline appropriate functions (During
optimizing) when the size/speed/code ratio is workable regardless
of the keyword hint.
More information about the Digitalmars-d
mailing list