named arguments, string interpolation, please stop.

claptrap clap at trap.com
Fri Jan 12 11:04:09 UTC 2024


On Friday, 12 January 2024 at 00:24:52 UTC, Adam Wilson wrote:
> On Thursday, 11 January 2024 at 23:09:46 UTC, Jonathan M Davis
>>
> To some extent Rikki is right that @nogc might be better as a 
> linter, because what it actually does is more in line with what 
> a linter is expected to do. @nogc is a hygiene feature that can 
> easily be misunderstood as doing something more than that.

That might make some sense if all you're doing is trying to 
minimize GC usage for performance reasons. But if you are writing 
code that has real time requirements you absolutely need to be 
100% sure the GC is not called into. And if you are doing real 
time code, you'll know enough to make sure the GC doesnt even 
know about the real time thread, so other threads using GC wont 
matter. It probably wont anyway as it'll likely be an external 
callback.

So im not sure if it matters if average joe has a 
misunderstanding about what nogc does (im not sure they actually 
do either tbh), but the people who actually really need it have 
to understand it and a lot more on top.

So "average joe doesnt understand nogc therefor its useless" is a 
strawman IMO.


More information about the Digitalmars-d mailing list