Signed int for array indexing?


#1

Why do JUCE datastructures (like Array) use signed int(s) for indexing? I can see the rationale for not using size_t in order to support some ancient standard or compiler I'm not familiar with that JUCE supports, but given that an index is should never be negative doesn't it make a lot more sense to make it an unsigned int?

I'm currently coding some data structures of my own and like to keep my code as JUCE-like as possible. I'm torn as to whether I should use the JUCE method for consistency or use size_t or unsigned int since they make more sense to me to use as index values.


#2
https://forum.juce.com/t/array-and-other-core-collections-dont-use-size-t

#3

Didn't find that thread. Thanks!