named arguments, string interpolation, please stop.

DrDread no at no.no
Thu Jan 11 21:18:10 UTC 2024


On Thursday, 11 January 2024 at 21:06:08 UTC, Dennis wrote:
> On Thursday, 11 January 2024 at 20:55:52 UTC, Timon Gehr wrote:
>> On 1/11/24 20:33, Walter Bright wrote:
>> Maybe you want to avoid implicit GC allocations in some part 
>> of the code, but now you have to mark the entire function 
>> `@nogc` to get the checking, and then you can no longer use 
>> exceptions in that function.
>>
>> etc.
>
> Considering the compiler doesn't use @nogc for anything that 
> matters (unlike nothrow, which changes code generation), I 
> wonder if we could degrade @nogc from a type attribute to a 
> linting tool. It would still point out accidental array 
> literals or closures, but not complain when calling a function 
> that hasn't been proven to be @nogc.
>
> It can still complain when calling a function that has been 
> inferred @gc, and if you want to be GC free 100% certain, don't 
> link it and the linker will complain about missing symbols.

this is discarding the use case that you want to mark only parts 
of your codebase nogc, but enforce it'S really nogc. we do use 
some realtime threads, but the rest off the app is @gc.



More information about the Digitalmars-d mailing list