Why D is not popular enough?
Adam D. Ruppe via Digitalmars-d
digitalmars-d at puremagic.com
Mon Aug 22 05:41:24 PDT 2016
On Monday, 22 August 2016 at 05:54:17 UTC, Shachar Shemesh wrote:
> On 21/08/16 12:47, ag0aep6g wrote:
>> Consider `ubyte(255) * ubyte(2) / ubyte(2)`. If the operands
>> are
>> promoted to a larger type, you get 255 as the result. If they
>> are not,
>> you have the equivalent of `ubyte x = 255; x *= 2; x /= 2;`
>> which gives
>> you 127.
>
> You are right. This is a hole in this suggestion. Let me think
> if it is plugable.
I actually consider that no different than `float a = int(1) /
int(2);` and see it as a feature.
But, of course, it does fall under the category of silent
breaking change (well, we could warn, but still).
More information about the Digitalmars-d
mailing list