Fixing C's Biggest Mistake

Walter Bright newshound2 at digitalmars.com
Sun Jan 1 01:36:47 UTC 2023


On 12/30/2022 10:04 PM, cc wrote:
> How many D programmers acquire data from sensors that require such default 
> language-integrated fault detection?

Any that use D for data analysis are going to have to deal with missing data points.

> Versus how many D programmers would be well benefited from having floating point 
> types treated like other numeric types, and sensibly default initialize to a 
> usable 0 value?

Having the program run is one thing, having it produce correct results is quite 
another. The bias here is to not guess at what the programmer intended thereby 
producing results that look good but are wrong. The bias is to let the 
programmer know that the results are wrong, and he needs to select the correct 
initial value, rather than guess at it.


> Why is one group determined to be the one that needs its use case catered to, 
> and not the other?

Think of it like implicit declaration of variables. Users don't need to be 
bothered with declaring variables before use, the language will do it for you. 
This is a great idea that surfaces time and again. Unfortunately, the language 
designers eventually figure out this produces more problems than it solves, and 
wind up having to painfully break existing code by requiring declarations.


More information about the Digitalmars-d mailing list