On Wed, 19 Nov 2014 10:03:34 +0000 Don via Digitalmars-d <[email protected]> wrote:
> No! No! No! This is completely wrong. Unsigned does not mean > "positive". It means "no sign", and therefore "wrapping > semantics". > eg length - 4 > 0, if length is 2. > > Weird consequence: using subtraction with an unsigned type is > nearly always a bug. negative length is a bug too. and it doesn't matter what king of integer is used if you didn't fail your sanity checks. > I wish D hadn't called unsigned integers 'uint'. They should have > been called '__uint' or something. They should look ugly. You > need a very, very good reason to use an unsigned type. > > We have a builtin type that is deadly but seductive. you just named all of built-in types. ah, and rename all keywords too, they far too dangerous.
signature.asc
Description: PGP signature
