|
|
|
|
|
by bad_user
3432 days ago
|
|
> `5 == Just 5` fails. But in Swift this works like you would want Why in the world would you want those two to be equal when they obviously don't represent the same thing? That doesn't make sense, not even if they have the exact same memory representation, in which case I'm pretty sure it has been a compromise, which would mean you're still dealing with `null` with some lipstick on it, making that type behave inconsistently with other types in the language. This kind of misguided convenience is exactly why equality tests in most languages are in general a clusterfuck. |
|
This is the difference between normal people and theoretical computer scientists, summarized in one sentence.