Why use a DFA instead of DIP1000?

Dennis dkorpel at gmail.com
Wed Sep 17 00:25:42 UTC 2025


On Tuesday, 16 September 2025 at 23:02:05 UTC, Richard (Rikki) 
Andrew Cattermole wrote:
> I wish I could have offered more in WONTFIX, it would have been 
> illuminating in false positive/perceived false positive 
> territory.

My search gives:

- 18295 [Scope][dip1000] `scope class` check too conservative 
under -dip1000
- 18637 [scope][DIP1000] "copying & i into allocated memory 
escapes a reference to local variable i" where it's inappropriate
- 19301 [DIP1000] missing overload abilities
- 23941 [DIP1000] Overloading by scope should be allowed

There's nothing interesting there.

> Is Atila aware that DIP1000 implementation has these issues 
> requiring a
> rewrite which you determined independently of me?

I said I was tempted to rewrite, not that it is required. You 
have to ask Atila whether he is aware, but I did talk about the 
DIP1000s issues and implementation quality at DConf '23 and '24.

> I suspect he is operating under the assumption that to get it 
> on by default is just a matter of tweaking.

It is. The thing that's blocking DIP1000 being enabled by default 
is that existing code relies on slicing local static arrays being 
freely allowed in `@safe` functions, but that could be disallowed 
in a next edition, unless you explicitly opt into scope semantics.



More information about the Digitalmars-d mailing list