Why use a DFA instead of DIP1000?
Dennis
dkorpel at gmail.com
Tue Sep 16 11:20:24 UTC 2025
On Tuesday, 16 September 2025 at 10:47:03 UTC, Richard (Rikki)
Andrew Cattermole wrote:
> It does actually.
>
> Godbolt has a control flow graph display for C#.
>
> https://csharp.godbolt.org/z/nMjPqYens
>
> ```
> Program:Main() (FullOpts):
> xor edi, edi
> tail.jmp [System.Console:WriteLine(int)]
> ```
>
> It silently culled the branches. Exactly what DFA should do in
> this situation.
I was referring to C#'s unused variable warnings that Adam
brought up, not the code generator.
> And that would be a rewrite and I don't mean just DIP1000.
>
> Doing this stuff as part of the type system isn't the normal
> way to handle it, and for good reason. Attaching a DFA engine
> today directly into the type system to resolve this is quite
> frankly too late. From what I've seen that would be a bad
> direction to go in and have no desire to watch that being tried.
I don't understand this paragraph at all, you're referring to 5
different things (rewrite, DIP1000, too late, type system, things
you've seen) and I don't know the context/relevance of any of
those.
More information about the Digitalmars-d
mailing list