Editions Ideas

Dom Disc dominikus at scherkl.de
Sun Dec 14 04:10:07 UTC 2025


On Saturday, 13 December 2025 at 15:41:52 UTC, Nick Treleaven 
wrote:
> On Saturday, 13 December 2025 at 14:50:16 UTC, Dom Disc wrote:
>> By the way, why the f*** is cast(bool)nan == true ?!?
>> This should also be fixed.
>
> No:
>
>> Fundamental types are true when non-zero
>
> https://dlang.org/spec/statement.html#boolean-conditions

Then the documentation should be fixed also. I can't imagine a 
situation where it would be useful to associate nan with any kind 
of truth. Change the spec to
"Fundamental types are true if they are valid and non-zero."

And wasn't the whole idea of editions to be able to make breaking 
changes? If you don't like the changes, you can stay with the 
current behavior.

And I consider integer-propagation a feature worthy of being 
dropped. And unary operators changing the type of its operand is 
part of this "feature".


More information about the Digitalmars-d mailing list