is vs ==
H. S. Teoh
hsteoh at qfbox.info
Sun Aug 31 14:42:17 UTC 2025
On Sat, Aug 30, 2025 at 10:15:26PM +0000, Brother Bill via Digitalmars-d-learn wrote:
> For the modern D developer, which is the more preferred choice, to use
> 'is' or '=='?
[...]
They have two different meanings. `is` is for determining identity (is
this the same variable); whereas `==` is for comparing values (do these
two variables have the same value). They are not interchangeable.
T
--
There are 10 kinds of people in the world: those who can count in binary, and those who can't.
More information about the Digitalmars-d-learn
mailing list