Request for Comment assert(__ctfe)

Basile B. b2.temp at gmx.com
Sun Apr 5 14:08:45 UTC 2020


On Sunday, 5 April 2020 at 14:04:12 UTC, Stefan Koch wrote:
> On Sunday, 5 April 2020 at 13:26:22 UTC, Basile B. wrote:
>> On Sunday, 5 April 2020 at 12:11:23 UTC, Stefan Koch wrote:
>>> Hi Guys,
>>>
>>> [...]
>>>
>>> What do you guys think?
>>>
>>> Cheers,
>>>
>>> Stefan
>>
>> I'd prefer a new func attribute `@ctfe`.
>> Also I find the current implementation unplesant. Cant you 
>> just check the assertion when they are already visited 
>> elsewhere e.g in 
>> dmd.expressionsem.ExpressionSemanticVisitor.visit(AssertExp) ? 
>> Also what if we are in a contract ?
>
> Don't we have enough attributes already?

I don't know. The criticism I have aginst func attributes is more 
that their style are mixed (i.e w/ or w/o '@'). Anyway I'm not 
strongly against your way, it's just that in a perfect world I 
imagine @ctfe rather.


More information about the Digitalmars-d mailing list