Steven Schveighoffer wrote:
First, it would work under my rules. j would be of type int. Under my rules, negating an unsigned value equates to a signed version of that type.


I've tried to stick with the principle that C code compiled with D will either work the same, or will fail with a compiler error message. It's very important to avoid "compiles, but produces subtly different behavior" for integer numeric code.

The reason for this is there's a lot of debugged, working C code that contains rather complicated integer expressions. How/why it works may be long since lost information, and having it fail when translated to D will cause frustration and distaste for D.

Changing the signedness of a sub-expression will definitely fall into this category.

Reply via email to