Closed fxkr closed 4 years ago
It means that 42 is a member of type Integer, as well as a member of type Number. So a member of two types.
If we would want to create an IntegerNumber type whose members are all the values that are members of Integer as well as Number, then the operator to use would be intersection (∩). So we could say: 42 is a member of type Integer ∩ Number. While also true, it's not what we wanted to convey. If a type "Integer ∩ Number" would exist, then 42 would be a member of Integer, Number, and Integer ∩ Number. So we're trying to make the reader aware of the full list of known types that a value is a member of.
Shall we update the wording to 42
is a member of the Integer
and Number
types?
From README.md:
Which of the following two interpretations is the right hand side of above statement referring to?
42
is a member of typeInteger
) and (42
is a member of typeNumber
)42
is a member of the type (Integer
andNumber
)Where (
Integer
andNumber
) would be some kind of union type, constructed from the typesInteger
andNumber
using theand
operator, or something? Theand
operator hasn't been introduced, so I am leaning towards taking first interpretation, but it says "type" (singular not plural), and alsoand
is monospaced which both hints at the second interpretation.