Signed word lengths and indexes
Andrei Alexandrescu
SeeWebsiteForEmail at erdani.org
Fri Jun 18 13:01:15 PDT 2010
Walter Bright wrote:
> Don wrote:
>> Walter Bright wrote:
>>> Andrei Alexandrescu wrote:
>>>> Note that your argument is predicated on using signed types instead
>>>> of unsigned types in the first place, and tacitly assumes the issue
>>>> is frequent enough to *add a new operator*. Yet unsigned shifts
>>>> correlate naturally with unsigned numbers.
>>>>
>>>> So what is exactly that is valuable in >>> that makes its presence
>>>> in the language justifiable?
>>>
>>> Generally the irritation I feel whenever I right shift and have to go
>>> back through and either check the type or just cast it to unsigned to
>>> be sure there is no latent bug.
>>
>> But x >>> 1 doesn't work for shorts and bytes.
>
> I know. That's ill thought out.
The please rule it out of the language.
Andrei
More information about the Digitalmars-d
mailing list