Post AWgdZfaN9CNLHtfcyO by fanf42@mastodon.social
(DIR) More posts by fanf42@mastodon.social
(DIR) Post #AWgZZAOygjgukwqTgW by SethTisue@fosstodon.org
2023-06-13T22:32:00Z
0 likes, 0 repeats
Some(null): if not friend, why friend-shaped?
(DIR) Post #AWgZZB5s7G0CtyujXk by fanf42@mastodon.social
2023-06-14T14:25:54Z
0 likes, 0 repeats
@SethTisue @rossTwo main standard work hypothesis :1/ Some(null) is a sociopath, it reaches exactly the goal for which it disguised2/ the system produced it and working against Some(null) is not the correct hill to win over, we must change the system so that Some(null) aren't produced anymore.Given the context, 1 is the most plausible :p
(DIR) Post #AWgZZBpxLurjCuTXNI by alexelcu@social.alexn.org
2023-06-14T15:06:20Z
0 likes, 0 repeats
@fanf42 IMO, Some(null) is the same as Some(None), and `null` isn't such a problem with a type system that has the `Null` type, alongside untagged union types (e.g., Scala 3, TypeScript) or nullable types (e.g., Kotlin).`Some(null)` works as advertised because the boxing of any type is the whole point. And `null` is actually useful in a language in which tagged union types have overhead, and I will die on this hill.@SethTisue
(DIR) Post #AWgdZfaN9CNLHtfcyO by fanf42@mastodon.social
2023-06-14T15:51:15Z
0 likes, 0 repeats
@alexelcu @SethTisue ah yes, zero cost abstraction is another hill, and I'm glad you and other are fighting for it (for the other parts : that's unfair to taunt me with Scala 3 :p)