What happens when a low-level type overflows or underflows?  For
example, if you decrement an int1 twice, what happens?

If you increment a uint8 past 255, do you get:

1. A uint8  with value 0?
2. A uint16 with value 256?
3. A failure?

What about incrementing an int8 past 127?  Do you get:

1. An int8  with value -128?
2. A uint8  with value 128?
3. An int16 with value 128?
4. A failure?

In both cases, I think option 1 is best, but I can see that option 2 in
the signed case might make sense in certain circumstances.  Personally,
I'd prefer to keep option 1 always, because if I want option 2 I should
cast to uint or a larger int first.


-'f


Reply via email to