|
|
|
|
|
by theseoafs
4671 days ago
|
|
Well, the happy birthday article has a section on "union types", and that code block has the comment "# Here a can be an Int32 or Float64". I just assumed that this meant a had the type Int32 | Float64. If the language doesn't actually have union types, then the article should probably be edited to reflect that (because it's very misleading on this issue). |
|
If you do:
a = [1, 'a', 1.5, "hello"]
you get Array(Int32 | Char | Float64 | String)
In a way, the Super+ type is a union type of all the subtypes of Super, including itself, but just with a shorter name.