Prevent struct going into heap memory
Paul Backus
snarwin at gmail.com
Mon Jul 21 02:47:06 UTC 2025
On Monday, 21 July 2025 at 02:10:09 UTC, Richard (Rikki) Andrew
Cattermole wrote:
> On 21/07/2025 2:03 PM, Paul Backus wrote:
>> Problem is, some people believe it shouldn't. Hence this
>> proposal to
>> give those that want that "reliability" control to make it
>> so.
>>
>> If there are people who believe that (a) the struct instance
>> should be allocated with the GC, but (b) the GC should not be
>> responsible for its cleanup, then those people are wrong,
>> plain and simple.
>
> Ah no, they don't like the GC introducing unreliability to the
> cleanup.
> So they want to ban destructors in closures.
This seems like a totally self-inflicted problem. If they don't
want to rely on the GC for cleanup, nobody is forcing them to. D
has plenty of mechanisms for predictable lifetime management
already.
> Just disabling destructors doesn't give the predictability that
> you seek, there has to be more language checks than that.
What "checks" could we possibly introduce that would help with
this?
More information about the dip.ideas
mailing list