digitalmars.D - Re: Signed word lengths and indexes
- Kagamin <spam here.lot> Jun 15 2010
Walter Bright Wrote:1) I'd like D to use signed words to represent lengths and array indexes.
This would lead to silent breakage of code transferred from C and C++.
I actually wrote an application in C and used signeds for array indexes, string positions and field offsets.2. For an operating system kernel's memory management logic, it still would make sense to represent the address space as a flat range from 0..n, not one that's split in the middle, half of which is accessed with negative offsets. D is supposed to support OS development.
Not to mention that if you really need it, you *can* workaround compiler checks by declaring your own getters/ranges.
Jun 15 2010