Signed word lengths and indexes

bearophile bearophileHUGS at lycos.com
Tue Jun 15 18:52:22 PDT 2010


This thread was not about linux or Linus or operating systems, it was about my proposal of changing indexes and lengths in D to signed words. So let's go back to the true purpose of this thread!

Walter Bright:
> 1. D source code is supposed to be portable between 32 and 64 bit systems. This 
> would fail miserably if the sign of things silently change in the process.

I don't understand this, please explain better.
If I use a signed word on both 32 and 64 bit systems to represent indexes and lengths what bad things can this cause?


> 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.

I don't understand, I don't understand how this is related to lengths and indexes, for examples array ones.

Bye,
bearophile


More information about the Digitalmars-d mailing list