Uranuz:
Another stupid question. Using this logic substraction for two
uint values should return int too, because it can produce
negative result. Am I right or not?
There are no stupid questions, there are only some stupid answers.
Generally uint - uint generates a result with a [-4_294_967_295,
4__294_967_295] range, that can't fit in an integer.
I think D here makes an exception to its rule, to avoid too many
casts. Because too many casts make the code even less safe than
breaking the range assignments rules.
Bye,
bearophile