Walter Bright wrote:
Ellery Newcomer wrote:

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.

You might want to consider changing your coding style to eschew the use of unsigned types.

I would strongly support that. But it doesn't really work.
The problem is size_t. The fact that it's unsigned is a root of all kinds of evil. It means .length is unsigned!!! Personally I think that any creation or access to an object which is larger in size than half the memory space, should be impossible without a special function call. Providing syntax sugar for this incredibly rare scenario introduces a plethora of bugs.

Reply via email to