http://d.puremagic.com/issues/show_bug.cgi?id=6949
--- Comment #10 from Walter Bright <[email protected]> 2012-11-29 19:50:14 PST --- (In reply to comment #6) > How about code like this? > > void main() { > uint i = 0; > if (i == -2) > assert(0, "never"); > } Equality has nothing to do with sign, i.e. there is no "signed equality" and "unsigned equality". There's just equality. I don't think there's any getting away from the fact that in languages like D and C, signed and unsigned are simply different ways of viewing the same data. For example, you can offset a pointer with both signed and unsigned values. There is no clean separation between the two. Some languages, such as Java, deal with this duality by defining the unsigned type out of existence. I've made more comments in the pull request. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
