4 ms·
> The ‘==‘ does not have a special overload for String instances As a non-Java developer I have to ask why you think this is a reasonable design choice. It's a
by andybak 7y ago
> The ‘==‘ does not have a special overload for String instances
As a non-Java developer I have to ask why you think this is a reasonable design choice. It's a massive footgun for the a casual polyglot Java developer. I can imagine just forgetting I can't do == if I've just switched from being immersed in another language.
- dpratt 7y agoIt’s precisely the same behavior you would get with C, C++, C# for references, with C# defaulting the ‘==‘ operator to short-circuit to ReferenceEquals() unless otherwise re-defined.
- andybak 7y ago> with C# defaulting the ‘==‘ operator Which is surely the important bit. I can just use "==" in C#.