Used in a Sentence

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.

Examples16
Definitions3
Parts of speech2

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.

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.

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

1

A contract is then a coercion `Any -> Maybe t` for some subtype of `Any`, `t`, which is being demanded.

2

It tends not to lead to hierarchies at all, with the whole subtype polymorphism thing not being supported.

3

Meaning that something about '5' makes it a special kind of subtype that can actually be used to execute the function.

4

And that def foo(x: Int): Int = fn(x) has the 'subtype' foo(5): fn(5) seems suggestive.

5

To do that you need proper generics and then use a common subtype or take it further and use a Numeric typeclass.

6

JS functions are a subtype of JS objects, but they are a distinct type.

7

The weakness of type inference arises, as you note, due to subtype polymorphism.

8

I do find the idea that fn(5) is a subtype of fn(x: Int) to be cute.

9

Adding support for 5.3's integer subtype is probably going to be a very large project, I would guess that annoyed Mike.

10

The embedded html subtype was interseting.

11

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?

12

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

1

People with the "predominantly inattentive" subtype (previously called ADD) typically go undiagnosed for long periods, or indefinitely.

2

You mean "parliamentary democracy" (which is a subtype of representative democracy), not "parliamentary republic".

3

Covariance and contravariance are intimately related to "mapping" and only incidentally related to subtype polymorphism.

4

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.