3 ms·
Fair enough, "is assignable to" is another synonym for "is subset of". I find it much easier to reason about things I can visualize, like sets, which is why I l
by thoughtspile 4y ago
Fair enough, "is assignable to" is another synonym for "is subset of". I find it much easier to reason about things I can visualize, like sets, which is why I love my set interpretation.
Edit: besides, it's quite unintuitve that "never" is assignable to anything. How can never be something?
- scotty79 4y agoIt's harder for me to make that connection but thank you for your write up. It's really great.
- Danoha 4y agoBecause "never" is an empty set and empty set is a subset of all sets.
- thoughtspile 4y agoExactly, that's why I wrote the article =) Makes perfect sense in "set world", but not in "common sense" based on your feeling of the word "never"
- scotty79 4y ago> it's quite unintuitve that "never" is assignable to anything Yeah, at first I was mislead by this. Initially I thought never is opposite of any while, it turns out, it's opposite of unknown. And any is just super weird, dynamic wildcard thing that is as large or as small as needed for any given operation (but not as small as never).
- lmm 4y ago> Fair enough, "is assignable to" is another synonym for "is subset of". Only if you're happy to conflate members and sets, which is pretty confusing IMO. If I write a = b I don't generally think of b as being a set, even though in some sense it is; "b is an expression with this type" is a much more natural way of thinking to me.