Re:Statically-typed error handling in Python using Mypy
by andybak on Sunday December 08, 2019 @05:38PM
(#21738920)
> 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.
Re:Statically-typed error handling in Python using Mypy
by dpratt on Sunday December 08, 2019 @10:24PM
(#21740159)
It’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.
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.