------- Comment #19 from [EMAIL PROTECTED] 2008-11-25 09:17 -------
(In reply to comment #18)
> > A better problem to spend energy on is the signed <-> unsigned morass. We've
> > discussed that many times and could not come up with a reasonable solution.
> > For
> > now, D has borrowed the C rule "if any operand is unsigned then the result
> > is
> > unsigned" leading to the occasional puzzling results known from C and C++.
> > Eliminating those fringe cases without losing compatibility with C and C++
> > is a
> > tough challenge.
> Indeed. Without promoting to a larger type, I think you are forced to take
> this course of action. When adding an int to a uint, who wants it to wrap
> around to a negative value? I can't think of a better solution.
You just did in fact. Your idea with defining some internal types is very
similar to one of the promising solutions we've been exploring for resolving
signedness of arithmetic operations.
I will in fact stop here and paste the rest of my message to the main newsgroup
because it's of general interest and segues away from this bug report.