Feedback from the Gripes and Wishes Campaign

Stefan Koch uplink.coder at googlemail.com
Mon May 29 20:11:12 UTC 2023


On Monday, 29 May 2023 at 18:10:08 UTC, Steven Schveighoffer 
wrote:
> On 5/29/23 1:18 AM, Walter Bright wrote:
>
>> I tried to do that at one point, and failed, after spending a 
>> couple weeks on it. It's not impossible, it's just that our 
>> CTFE implementation is a rat's nest and defies such 
>> improvements.
>
> It sounds like we need to revisit how CTFE is implemented. This 
> should be a priority for D.
>
>>> If malloc allocates GC memory, wouldn't the GC just take care 
>>> of it?
>> 
>> Then you might as well just use the GC instead of malloc.
>> 
>
> The point is to make functions that currently use malloc 
> CTFE-able, not to rewrite those functions so they are CTFE-able.
>
> It's not as easy as I have said, but I think it's still doable.
>
> -Steve

That can't actually happen while malloc is being malloc.
If we can rewrite the implementation it is possible but it means 
we have to special case malloc and treat it as a built-in 
function.



More information about the Digitalmars-d mailing list