The idea of this post is to give you a framework to reason about types (in programming), I'm not gonna try to give an exhaustive and full mathemati...
For further actions, you may consider blocking this person and/or reporting abuse
Not sure why you avoided the term set, it's exactly what a type is, the set of all possible values. For example a union type in Typescript can be expressed as:
Systems like LiquidHaskell even allow you to specify a subset of types for your functions, so you can e.g. only pass lists that are proven to not be empty to a function that extracts the first element.
The issue here is that sets have formal definition and if you say that types are sets you claim that types follow all formal rules for sets. I am not sure that this is the case, even that "simple" types are very similar to sets. I will need to read more to explain exact difference
That's why I heartfelt aversion for any dynamic-typed programming language:
why would you throw away such a beautiful feature that does tell you, at compile time, if "X can be fitted into Y / passed to function Z()" (not just checking for undefined), rather than have errors at runtime ? :confused:
Lack of type checking looks great at first. But in the long run...
Finally posted it :D, I like your writing style, keep it coming man