float init 0 request
Basile B.
b2.temp at gmx.com
Fri Aug 28 09:05:13 UTC 2026
On Wednesday, 26 August 2026 at 02:57:59 UTC, Richard (Rikki)
Andrew Cattermole wrote:
> On 26/08/2026 2:54 PM, Richard (Rikki) Andrew Cattermole wrote:
>> On 26/08/2026 4:33 AM, Basile B. wrote:
>>> I have followed the topic since the beginning and I see
>>> something that's never been noted: an inconsistency is
>>> boolean evaluation.
>>>
>>> ```d
>>> void main()
>>> {
>>> int a;
>>> assert(!a); // ok
>>> float b;
>>> assert(!b); // fails
>>> }
>>> ```
>> You've made a great point.
>>
>> We should remove truthiness from floats, it doesn't make sense
>> for it to support it.
>
> https://github.com/dlang/dmd/issues/23704
Thanks, I'm curious to see if and how that problem will be
handled.
More information about the Digitalmars-d
mailing list