dmd 1.046 and 2.031 releases
Walter Bright
newshound1 at digitalmars.com
Tue Jul 7 16:41:53 PDT 2009
Robert Jacques wrote:
> The new rules are definitely an improvement over C, but they make
> byte/ubyte/short/ushort second class citizens, because practically every
> assignment requires a cast:
> byte a,b,c;
> c = cast(byte) a + b;
They've always been second class citizens, as their types keep getting
promoted to int. They've been second class on the x86 CPUs, too, as
short operations tend to be markedly slower than the corresponding int
operations.
> And if it weren't for compatibility issues, it would almost be worth it
> to remove them completely.
Shorts and bytes are very useful in arrays and data structures, but
aren't worth much as local variables. If I see a:
short s;
as a local, it always raises an eyebrow with me that there's a lurking bug.
More information about the Digitalmars-d-announce
mailing list