Whats the rationale for using signed numbers as indexes in .Net?
In Python, you can index from the end of an array by sending negative numbers, but this is not the case in .Net. It's not easy for .Net to add such a feature later as it could break other code perhaps using special rules (yeah, a bad idea, but I guess it happens) on indexing.
Not that I have ever have needed to index arrays over 2,147,483,647 in size, but I really cannot understand why they choose signed numbers.
Can it be because it's more normal to use signed numbers in code?
Edit: I just found these links:
The perils of unsigned iteration in C/C++
Signed word lengths and indexes
Edit2: Ok, a couple of other good reasons from the thread Matthew Flaschen posted:
- Historical reasons as it's a c-like language
- Interop with c