surprising semantics of the && expression

Iain Buclaw ibuclaw at gdcproject.org
Tue Feb 3 23:11:03 UTC 2026


On Tuesday, 3 February 2026 at 17:29:05 UTC, 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 ?
>

This has been valid since early D1.

https://digitalmars.com/d/1.0/expression.html#OrOrExpression

> Let's mention the POLA. The very basic human-being would expect 
> that both the LHS and RHS sub-expressions can be implictly 
> convertible to `bool`.

Perhaps you've never used a scripting language such as Perl?  
Ruby and Python are probably the same too.


More information about the Digitalmars-d mailing list