News for hackers. Stuff that matters.
Re:Java 18 / JDK 18: General Availability by LordDragonfang on Tuesday March 22, 2022 @12:50PM (#30768458)
Python uses the `is` operator, which is semantically much more explicit (and arguably correct, though C#'s use of the `is` operator is probably more correct).

edit:

Kotlin uses `===`, which is another good option.

Re:Java 18 / JDK 18: General Availability by marginalia_nu on Tuesday March 22, 2022 @01:01PM (#30768619)
=== seems almost more dangerous. It's a lot easier to tell == from Objects.equals(a,b) than == from ===.
Re:Java 18 / JDK 18: General Availability by wiseowise on Tuesday March 22, 2022 @03:37PM (#30770486)
Seriously?
Re:Java 18 / JDK 18: General Availability by marginalia_nu on Tuesday March 22, 2022 @05:06PM (#30771553)
Yes.

Look, languages are moving away from permitting constructs like "if (x = 1)" because it's difficult to distinguish from "if (x == 1)". Adding "if (x === 1)" into the mix is arguably a step backwards in terms of clarity.