surprising semantics of the && expression

Forum User forumuser at example.com
Tue Feb 3 22:34:54 UTC 2026


On Tuesday, 3 February 2026 at 20:15:42 UTC, Timon Gehr wrote:
> On 2/3/26 18:29, user1234 wrote:
>> So yesterday someone oppened an issue:
>> 
>> https://github.com/dlang/dmd/issues/22500
>> 
>> Which was closed after accurate explanations of Ian. However 
>> I'd like to know where this semantics are coming from. I 
>> suspect C++ ? What is the history behind ?
>> ...
>
> C is not very type safe (and used to be even less so), and 
> people get attached to idioms.

Sure, but in C (as in C++) with int b and void foo ()

b && foo ();

is not an idiom. It does not compile.



More information about the Digitalmars-d mailing list