Request for Comment assert(__ctfe)

Atila Neves atila.neves at gmail.com
Mon Apr 6 13:49:19 UTC 2020


On Monday, 6 April 2020 at 13:41:52 UTC, Stefan Koch wrote:
> On Monday, 6 April 2020 at 10:14:24 UTC, Atila Neves wrote:
>> On Sunday, 5 April 2020 at 12:11:23 UTC, Stefan Koch wrote:
>>> [...]
>>
>> Wouldn't it be easier to skip codegen for private functions 
>> that are never called from non CTFE contexts?
>
> Easier from the user-perspective yes.
> From the compiler perspective,
> That's another step which may take quite a while to do 
> correctly.
> The easy thing would be (Essentially an (N*M) loop over all 
> calls and functions),

Where N and M are all calls and private functions in one module, 
not all code in a project.

> For now assert(__ctfe); enables people to manually mark their 
> ctfe-only, functions.

What about `in(__ctfe)` instead?



More information about the Digitalmars-d mailing list