float init 0 request

Richard (Rikki) Andrew Cattermole richard at cattermole.co.nz
Mon Aug 24 20:53:50 UTC 2026


On 24/08/2026 11:05 PM, GB wrote:
> On Sunday, 23 August 2026 at 23:31:23 UTC, Richard (Rikki) Andrew 
> Cattermole wrote:
>> ..
>> ...
>> TLDR: what you are wanting isn't that hard to implement, but is 
>> unlikely to be accepted by the D community.
> 
> It sounds like a potentially useful feature, but it's not really 
> something 'I want'. I just offered it as a possible solution to those 
> debating the issues in this thread.
> 
> As for Fast DFA:
> 
> As I understand it, the existing entry architecture intentionally 
> separates analysis from reporting.
> 
> So the question would be how to get it to change the treatment of 
> @mustAssign from "don't report" to "diagnose."
> 
> Most of the existing machinery needed seems to already be in place.
> 
> I expect with not to much work, the Fast DFA expression walker/reporter 
> could easily be modified to handle @mustAssign (should the feature ever 
> be seriously considered).
I wouldn't implement it using an attribute, nor am I prepared to merge it.

Changing behavior based upon the variable and type isn't a good idea, 
due to other modelling.

Changing the behavior so that the writeOnVarAtThisPoint prefers < 0 
value, in meet/joinConsequence functions while possible, would effect 
other parts of the engine and how they function.

The way I designed and implemented the fast dfa engine is to use as much 
of the information it can gather as possible, it all works together, 
every analysis interacts with the others to give the least amount of 
false positives as possible while trying to get as much guarantees as 
possible. There is a lot of interplay within it.



More information about the Digitalmars-d mailing list