Discussion about deprecating @nogc and workarounds

monkyyy crazymonkyyy at gmail.com
Mon Sep 9 02:14:12 UTC 2024


On Sunday, 8 September 2024 at 09:14:21 UTC, claptrap wrote:
> On Sunday, 8 September 2024 at 00:18:53 UTC, Kapendev wrote:
>> On Sunday, 8 September 2024 at 00:10:05 UTC, Kapendev wrote:
>>> On Saturday, 7 September 2024 at 13:06:45 UTC, Lance 
>>> Bachmeier wrote:
>>>> On Saturday, 7 September 2024 at 08:05:10 UTC, Kapendev 
>>>> wrote:
>>>
>>> You just don't use `@nogc`.
>>> My point is that your code is already nogc. No need for an 
>>> attribute.
>>
>> And if you are unsure if a function allocates with the gc, you 
>> can always test.
>
> And test every function you call, and every function that 
> function calls, and so on. And hope that nobody changes the 
> implementation after you've checked it, etc..

IFF d had a full time embedded and wasm std dev, and a backlog of 
bug reports shorter then 10 years long, it would be fine as they 
make whatever style guide changes and edge cases could be solved 
as they came up from real use.

Adding nogc to an existing old tech debt project is less 
realistic then doing an separate new std; and that new std could 
just be compiled with betterc


More information about the Digitalmars-d mailing list