Does D have too many features?

Timon Gehr timon.gehr at gmx.ch
Tue May 1 06:40:05 PDT 2012


On 04/30/2012 02:44 PM, Don Clugston wrote:
>
> (cast(ulong)x) >> 3 is safer than x >>> 3, unfortunately.

In what way is it safer?

void main() {
     short x = -1;
     assert((cast(ulong)x) >> 3 == cast(long)x >>> 3);
}


More information about the Digitalmars-d mailing list