deprecate boolean evaluation of floating point and character types

Nicholas Wilson iamthewilsonator at hotmail.com
Wed May 1 03:45:33 UTC 2024


On Tuesday, 30 April 2024 at 18:09:22 UTC, Richard (Rikki) Andrew 
Cattermole wrote:
> Characters are quite often compared against zero when doing 
> string handling in C without the binary expression. For this 
> reason I would not want to see this changed.


D has the philosophy that valid C code should either behave the 
same in C as in D, or give an error (c.f. integer promotion 
rules). It is reasonable to make misleading behaviour like this 
an error.



More information about the dip.ideas mailing list