How can I tell D that function args are @nogc etc.

John Dougan jdougan at acm.org
Sat Apr 13 03:05:03 UTC 2024


On Friday, 12 April 2024 at 15:08:50 UTC, Steven Schveighoffer 
wrote:
> On Friday, 12 April 2024 at 03:57:40 UTC, John Dougan wrote:
>
>> What is the procedure for bug reporting? I'm looking at the 
>> issues tracker and have no clue how to drive the search to see 
>> if this is already there.
>>
>
> https://issues.dlang.org
>
> While entering the bug title, it does a fuzzy search for 
> existing open and closed issues.

The typical problem with issue/bug database searches is you have 
to know the important discriminating keywords that projects 
evolve over time. When you are new to a system, as I am with D, 
you end up looking manually through a lot of possibles. Another 
barrier to noobs that project long timers may not notice.

Any rate,  it appears 
https://issues.dlang.org/show_bug.cgi?id=22046 is the same issue.

And I'm not sure how to interpret it, as a noob I don't have 
enough context. It appears to be deliberate and also afflicts var 
declarations. Since 2014.

 From my point of view, either it's still a bug and needs to be 
written up in a best practices list with all the other long term 
stuff you need to work around until it can be fixed (eg. "in 
alias and var function declarations, put attributes as a suffix 
because...", https://dlang.org/dstyle.html *might* be a place), 
or it has aged in to become the effective intended behavior and 
should be documented other places and have a compiler error or 
warning ("@safe in prefix position in alias, is ignored"). Or of 
course, it could get fixed but my experiences have shown me that 
after 10 years that is low probability with most projects.

I'm not trying to be a dick here. I've managed projects and know 
what unintentional dumb stuff can happen. But, at the moment, I'm 
evaluating D for a project (porting 30,000 lines of very old C 
with strict timing requirements) and I've got some time to build 
impressions of system language candidates. There appears to be a 
lot of talk from time to time over in General about luring new 
people in to work with D, and this kind of issue is relevant.

> -Steve

   --john



More information about the Digitalmars-d-learn mailing list