Super Lint

Pragma ericanderton at
Wed Sep 20 12:13:13 PDT 2006

Walter Bright wrote:
> I've been interested in various ideas for static checking for common bug 
> patterns for D. For example:
>     for (int i = 0; i < 10; i++)
>     {    foo();
>         break;
>     }
> would be flagged as a suspicious use of break. Are there any legitimate 
> uses of break in this manner? Any thoughts and ideas in this direction?

Well, one could throw from within foo(), but that would still abort the 
loop on the first pass.  Nope, there's no legitimate use I can think of.

Are you considering making a lint tool for D?

- EricAnderton at yahoo

More information about the Digitalmars-d mailing list