D should disallow forward references

Don nospam at nospam.com
Tue Aug 25 07:20:52 PDT 2009


grauzone wrote:
> Right now, D seems to *intend* to allow arbitrary forward references of 
> types and functions. But the reality is different. dmd accepts some 
> forward references, but chokes up on others. For example, forward 
> references to classes are normally no problem, while enums can't be 
> forward referenced at all. (Which is funny; you'd think that enums are 
> simpler than classes.) Structs often require creative rearrangement of 
> source code to make them work.
> 
> For a general overview of forward reference bugs, just search Bugzilla:
> http://d.puremagic.com/issues/buglist.cgi?quicksearch=forward+reference
> 
> I think you can say, that forward referencing is quite incomplete and 
> buggy in dmd. Even worse, it bothers the programmer in everyday 
> programming. The programmer gets the feeling, he's doing more work 
> working around compiler bugs, than on his program. There's nothing worse 
> than a core language feature, that doesn't work as advertised.
> 
> Unfortunately, Walter seems to consider these bugs as minor issues, and 
> apparently, he thinks that amount of work fixing them doesn't pay off. 
> Although he often fixes some related bugs here and there, the problem 
> remains.
> 
> Conclusion: other than trying to keep a buggy feature, that isn't going 
> to be fixed, remove it from the language.

Search for the number of RESOLVED "forward reference" bugs: 45
Unfixed, without patch: 44
Unfixed, with patch: 4

So it's about a 50% fix rate.

Now consider all bugs tagged as rejects-valid:
257 not fixed, with no patch.
17 not fixed, but with patch (almost all will be in the next release).
202 fixed.
It's about a 45% fix rate.

For ICE bugs, it's a lot better: 261 fixed, 28 unfixed, 19 with patches.
Almost a 90% fix rate.

So, yeah, the fix rate is pretty bad. But suprisingly, it's NOT worse 
for forward reference bugs!

The real problem is that there's about a thousand bugs in bugzilla!!












More information about the Digitalmars-d mailing list