size_t can easily bite you* in the ass:

import std.algorithm;

void main()
{
    int[] a;
    int val = max(0, a.length - 1);
    assert(val > 0);  // NG, woops!
}

* = me

That one is easy to catch, but in a complex expression you might have
ints and size_t and  everything gets converted to unsigned, and then
you end up with some value over int.max  which is implicitly assigned
to an int. :/

Reply via email to