Questions tagged [subtypes]
The subtypes tag has no usage guidance.
3
questions
14
votes
10
answers
4k
views
Are there any practical use cases for subtyping primitive types?
In, for example, Python, it is possible to subtype primitive types:
...
15
votes
1
answer
513
views
What are some options for integrating subtyping with Damas-Hindley-Milner inference?
Type inference in a Damas-Hindley-Milner type system with subtyping is known to be undecidable in general.
What makes it so difficult? What options are there to get around undecidability which could ...
6
votes
1
answer
261
views
Are there disadvantages to having subtypes of algebraic data types?
Many languages support algebraic data types which are essentially tagged unions of tuples or structs. For example, suppose we have a type for an expression node in an AST:
...