A group of specific things within a larger, more general group.
subtype
Definitions, parts of speech, synonyms, and sentence examples for subtype.
Editorial note
A contract is then a coercion `Any -> Maybe t` for some subtype of `Any`, `t`, which is being demanded.
Quick take
A group of specific things within a larger, more general group.
Meaning at a glance
The clearest senses and uses of subtype gathered in one view.
To categorise as a subtype.
(programming) The data type represented by a subclass.
Definitions
Core meanings and parts of speech for subtype.
noun
A group of specific things within a larger, more general group.
verb
To categorise as a subtype.
noun
(programming) The data type represented by a subclass.
Example sentences
A contract is then a coercion `Any -> Maybe t` for some subtype of `Any`, `t`, which is being demanded.
It tends not to lead to hierarchies at all, with the whole subtype polymorphism thing not being supported.
Meaning that something about '5' makes it a special kind of subtype that can actually be used to execute the function.
And that def foo(x: Int): Int = fn(x) has the 'subtype' foo(5): fn(5) seems suggestive.
To do that you need proper generics and then use a common subtype or take it further and use a Numeric typeclass.
JS functions are a subtype of JS objects, but they are a distinct type.
The weakness of type inference arises, as you note, due to subtype polymorphism.
I do find the idea that fn(5) is a subtype of fn(x: Int) to be cute.
Adding support for 5.3's integer subtype is probably going to be a very large project, I would guess that annoyed Mike.
The embedded html subtype was interseting.
Example: How in Java do you add a method to the String class so that all instances of String gain the method without extending String and introducing a new subtype?
I can't look for source now, but subtype polymorphism (like subclassing) is not compatible with type inference, unlike parametric polymophism (like SML polymophism or Java generics).
Quote examples
People with the "predominantly inattentive" subtype (previously called ADD) typically go undiagnosed for long periods, or indefinitely.
You mean "parliamentary democracy" (which is a subtype of representative democracy), not "parliamentary republic".
Covariance and contravariance are intimately related to "mapping" and only incidentally related to subtype polymorphism.
How about a graph type "arrow diagram" as a subtype of "drawing"?
Frequently asked questions
Short answers drawn from the clearest meanings and examples for this word.
How do you use subtype in a sentence?
A contract is then a coercion `Any -> Maybe t` for some subtype of `Any`, `t`, which is being demanded.
What does subtype mean?
A group of specific things within a larger, more general group.
What part of speech is subtype?
subtype is commonly used as noun, verb.