In programming, there are many places where I feel that uint should be used, but libraries use int instead. I have a hard time coming up with multiple examples of this right now, but it’s just a feeling. In many cases, the sign is not important, and in many algorithms, it’s not even needed. That means half of the integers are wasted! I feel heartbroken by such a waste.
I’m just a novice, but if you really need an example:
public class Object {
public virtual int GetHashCode() {}
}
public class Dictionary<TKey,TValue> {
private int FindEntry(TKey key) {
...
if (buckets != null) {
int hashCode = comparer.GetHashCode(key) & 0x7FFFFFFF;
...
}
...
}
}
1