Data types | Type theory | Polymorphism (computer science)

Subtyping

In programming language theory, subtyping (also subtype polymorphism or inclusion polymorphism) is a form of type polymorphism in which a subtype is a datatype that is related to another datatype (the supertype) by some notion of substitutability, meaning that program elements, typically subroutines or functions, written to operate on elements of the supertype can also operate on elements of the subtype. If S is a subtype of T, the subtyping relation (written as S <: T, S ⊑ T, or S ≤: T ) means that any term of type S can safely be used in any context where a term of type T is expected. The precise semantics of subtyping here crucially depends on the particulars of how "safely be used" and "any context" are defined by a given type formalism or programming language. The type system of a programming language essentially defines its own subtyping relation, which may well be trivial, should the language support no (or very little) conversion mechanisms. Due to the subtyping relation, a term may belong to more than one type. Subtyping is therefore a form of type polymorphism. In object-oriented programming the term 'polymorphism' is commonly used to refer solely to this subtype polymorphism, while the techniques of parametric polymorphism would be considered generic programming. Functional programming languages often allow the subtyping of records. Consequently, simply typed lambda calculus extended with record types is perhaps the simplest theoretical setting in which a useful notion of subtyping may be defined and studied. Because the resulting calculus allows terms to have more than one type, it is no longer a "simple" type theory. Since functional programming languages, by definition, support function literals, which can also be stored in records, records types with subtyping provide some of the features of object-oriented programming. Typically, functional programming languages also provide some, usually restricted, form of parametric polymorphism. In a theoretical setting, it is desirable to study the interaction of the two features; a common theoretical setting is system F<:. Various calculi that attempt to capture the theoretical properties of object-oriented programming may be derived from system F<:. The concept of subtyping is related to the linguistic notions of hyponymy and holonymy. It is also related to the concept of bounded quantification in mathematical logic (see Order-sorted logic). Subtyping should not be confused with the notion of (class or object) inheritance from object-oriented languages; subtyping is a relation between types (interfaces in object-oriented parlance) whereas inheritance is a relation between implementations stemming from a language feature that allows new objects to be created from existing ones. In a number of object-oriented languages, subtyping is called interface inheritance, with inheritance referred to as implementation inheritance. (Wikipedia).

Subtyping
Video thumbnail

01b Spatial Data Analytics: Subsurface Data

Lecture of the data available for subsurface modeling.

From playlist Spatial Data Analytics and Modeling

Video thumbnail

01 Spatial Data Analytics: Subsurface Modeling

Lecture discussing the concept of subsurface modeling, integrating information sources, quantification over volume and properties of interest for decision support.

From playlist Spatial Data Analytics and Modeling

Video thumbnail

Prealgebra 1.3a - Subtracting

An introduction to subtraction, the terms and concepts involved, and subtraction as the opposite of addition. Some example problems are carefully worked and explained. From the Prealgebra course by Derek Owens. This course is available online at http://www.LucidEducation.com.

From playlist Prealgebra Chapter 1 (Complete chapter)

Video thumbnail

Ex 2: Subtracting Signed Fractions

This video provides two examples of subtracting signed fractions. Complete Video Library at http://www.mathispower4u.com

From playlist Adding and Subtracting Fractions

Video thumbnail

Determine a Subtraction Problem Modeled on a Number Line

This video explains how to write an subtraction equation from a number line model. http://mathispower4u.com

From playlist Addition and Subtraction of Whole Numbers

Video thumbnail

Adding And Subtracting Fractions - Quick Method

Adding and subtracting fractions by cross-multiplying or the upside down picnic table!

From playlist QTS Numeracy Skills

Video thumbnail

Ethical Hacking Tutorial | Comprehensive Subdomain Enumeration | Session 12 | #cybersecurity

Don’t forget to subscribe! This ethical hacking tutorial series is about comprehensive subdomain enumeration. Through this tutorial series, I will be demonstrating how to install, configure and use different tools for subdomain enumeration. We will try to go through the following subdom

From playlist Comprehensive Subdomain Enumeration

Video thumbnail

Every Programming Language in (another) 15 Minutes: Data Types

A very brief survey of the most essential concepts about data types common to most programming languages. PUBLICATION PERMISSIONS: Original video was published with the Creative Commons Attribution license (reuse allowed) ATTRIBUTION CREDITS: Original video source: https://www.youtube.

From playlist Software Development

Video thumbnail

How To Create Billing System In C# and ASP .NET | Session 13 | #programming

Don’t forget to subscribe! This project series will guide on how to create a billing system in C and ASP.NET This tutorial will cover all the details (resources, tools, languages etc) that are necessary to create a complete and operational web-based billing system in C# and ASP.NET. You

From playlist Create Billing System In C# and ASP .NET

Video thumbnail

Substructural Type Theory - Zeilberger

Noam Zeilberger IMDEA Software Institute; Member, School of Mathematics March 22, 2013 For more videos, visit http://video.ias.edu

From playlist Mathematics

Video thumbnail

Crust of Rust: Subtyping and Variance

In this episode of Crust of Rust, we go over subtyping and variance — a niche part of Rust that most people don't have to think about, but which is deeply ingrained in some of Rust's borrow ergonomics, and occasionally manifests in confusing ways. In particular, we explore how trying to im

From playlist Crust of Rust

Video thumbnail

Dvir Aran, Systematic pan-cancer analysis of tumour purity

On March 1, 2016, Dr. Aran delivered this talk at the annual CEHG symposium on Stanford campus. CEHG is Stanford's Center for Computational, Evolutionary and Human Genomics.

From playlist Stanford CEHG Speaker Playlist

Video thumbnail

How To Create Billing System In C# and ASP .NET | Session 04 | #programming

Don’t forget to subscribe! This project series will guide on how to create a billing system in C and ASP.NET This tutorial will cover all the details (resources, tools, languages etc) that are necessary to create a complete and operational web-based billing system in C# and ASP.NET. You

From playlist Create Billing System In C# and ASP .NET

Video thumbnail

The 1918 Spanish Flu—The Search for the Virus | Part 3 of 3

The 1918 flu killed 50 million people—then set the stage for World War II on its way out. A century later, scientists searched for an intact specimen of the virus for further study. Put on a fedora and join the ultimate detective story: the search for a killer under a microscope with the w

From playlist Modern History

Video thumbnail

Ethical Hacking Tutorial | Comprehensive Subdomain Enumeration | Session 16 | #cybersecurity

Don’t forget to subscribe! This ethical hacking tutorial series is about comprehensive subdomain enumeration. Through this tutorial series, I will be demonstrating how to install, configure and use different tools for subdomain enumeration. We will try to go through the following subdom

From playlist Comprehensive Subdomain Enumeration

Video thumbnail

RubyConf 2017: Types and Ruby Programming Language by Soutaro Matsumoto

Types and Ruby Programming Language by Soutaro Matsumoto Types have been a big interest for Rubyists for more than ten years. Even before Ruby3, some researchers have tried to type check Ruby programs. All of them had failed. No one in the world has successfully implemented practical type

From playlist RubyConf 2017

Video thumbnail

Ethical Hacking Tutorial | Comprehensive Subdomain Enumeration | Session 10 | #cybersecurity

Don’t forget to subscribe! This ethical hacking tutorial series is about comprehensive subdomain enumeration. Through this tutorial series, I will be demonstrating how to install, configure and use different tools for subdomain enumeration. We will try to go through the following subdom

From playlist Comprehensive Subdomain Enumeration

Video thumbnail

How To Create Billing System In C# and ASP .NET | Session 12 | #programming

Don’t forget to subscribe! This project series will guide on how to create a billing system in C and ASP.NET This tutorial will cover all the details (resources, tools, languages etc) that are necessary to create a complete and operational web-based billing system in C# and ASP.NET. You

From playlist Create Billing System In C# and ASP .NET

Video thumbnail

Ethical Hacking Tutorial | Comprehensive Subdomain Enumeration | Session 08 | #cybersecurity

Don’t forget to subscribe! This ethical hacking tutorial series is about comprehensive subdomain enumeration. Through this tutorial series, I will be demonstrating how to install, configure and use different tools for subdomain enumeration. We will try to go through the following subdom

From playlist Comprehensive Subdomain Enumeration

Video thumbnail

18. Disease Progression Modeling and Subtyping, Part 1

MIT 6.S897 Machine Learning for Healthcare, Spring 2019 Instructor: David Sontag View the complete course: https://ocw.mit.edu/6-S897S19 YouTube Playlist: https://www.youtube.com/playlist?list=PLUl4u3cNGP60B0PQXVQyGNdCyCTDU1Q5j Prof. Sontag discusses aspects of disease progression modelin

From playlist MIT 6.S897 Machine Learning for Healthcare, Spring 2019

Related pages

Typing rule | Parametric polymorphism | Type conversion | Undecidable problem | Duck typing | Nominal type system | User-defined type | Scala (programming language) | Identity function | Top type | Formal language | Disjoint union | Binary relation | Preorder | Bounded quantification | Type system | Set-builder notation | Liskov substitution principle | Generic programming | Covariance and contravariance (computer science) | Structural type system | Category theory | Type theory | Record (computer science) | Invariant (computer science) | Polymorphism (computer science) | Refinement type | Trait (computer programming) | Simply typed lambda calculus | Algebraic data type