On 10/26/2010 04:21 PM, Walter Bright wrote:
7. Certainly the idea of non-null types has a lot of adherents, D
doesn't have that.
8. The only successful solution to this I've seen is Java's simply not
having unsigned types. Analysis tools just produce false positives.
or python's variation: not having fixed integer types at all.
Question: would it be feasible to make D use some sort of bignum type as
the default index type for arrays, etc, but make it possible for the
programmer to use uint or ulong or whatever for e.g. places where
performance is an issue?
I don't think there's much value left for add-on static analysis tools.
I went to the trouble of modifying dmd to warn on unsigned/signed
comparison. It found me some bugs which probably would not have been
noticed otherwise. Did it produce false positives? Yes. Did that make me
wish I hadn't done it? Hell no.
As long as there are things which dmd doesn't warn about, there will be
value in add-on static analysis tools. The key idea is leave the
warnings off unless the programmer explicitly asks for it.