Which D features to emphasize for academic review article

Don Clugston dac at nospam.com
Mon Aug 13 03:11:05 PDT 2012


On 12/08/12 01:31, Walter Bright wrote:
> On 8/11/2012 3:01 PM, F i L wrote:
>> Walter Bright wrote:
>>> I'd rather have a 100 easy to find bugs than 1 unnoticed one that
>>> went out in
>>> the field.
>>
>> That's just the thing, bugs are arguably easier to hunt down when
>> things default
>> to a consistent, usable value.
>
> Many, many programming bugs trace back to assumptions that floating
> point numbers act like ints. There's just no way to avoid knowing and
> understanding the differences.

Exactly. I have come to believe that there are very few algorithms 
originally designed for integers, which also work correctly for floating 
point.

Integer code nearly always assumes things like, x + 1 != x, x == x,
(x + y) - y == x.


for (y = x; y < x + 10; y = y + 1) { .... }

How many times does it loop?




More information about the Digitalmars-d mailing list