Logo
Unionpedia
Communication
Get it on Google Play
New! Download Unionpedia on your Android™ device!
Free
Faster access than browser!
 

Covariance and contravariance (computer science)

Index Covariance and contravariance (computer science)

Many programming language type systems support subtyping. [1]

40 relations: Animal shelter, Array data type, Bounded quantification, C Sharp (programming language), C++, Category theory, Closure (computer programming), Common Lisp Object System, Covariant return type, D (programming language), Eiffel (programming language), First-class function, Function overloading, Function type, Functor, Higher-order function, Inheritance (object-oriented programming), Java (programming language), Java Platform, Standard Edition, John C. Reynolds, Joshua Bloch, Liskov substitution principle, Luca Cardelli, Martin Odersky, Method overriding, Multiple dispatch, OCaml, Parametric polymorphism, Polymorphism (computer science), Programming language, Robustness principle, Sather, Scala (programming language), Subtyping, Type constructor, Type inference, Type system, Undecidable problem, Unified Modeling Language, Wildcard (Java).

Animal shelter

An animal shelter or pound is a place where stray, lost, abandoned or surrendered animals, mostly dogs and cats, and sometimes sick or wounded wildlife are kept and rehabilitated.

New!!: Covariance and contravariance (computer science) and Animal shelter · See more »

Array data type

Language support for array types may include certain built-in array data types, some syntactic constructions (array type constructors) that the programmer may use to define such types and declare array variables, and special notation for indexing array elements.

New!!: Covariance and contravariance (computer science) and Array data type · See more »

Bounded quantification

In type theory, bounded quantification (also bounded polymorphism or constrained genericity) refers to universal or existential quantifiers which are restricted ("bounded") to range only over the subtypes of a particular type.

New!!: Covariance and contravariance (computer science) and Bounded quantification · See more »

C Sharp (programming language)

C# (/si: ʃɑːrp/) is a multi-paradigm programming language encompassing strong typing, imperative, declarative, functional, generic, object-oriented (class-based), and component-oriented programming disciplines.

New!!: Covariance and contravariance (computer science) and C Sharp (programming language) · See more »

C++

C++ ("see plus plus") is a general-purpose programming language.

New!!: Covariance and contravariance (computer science) and C++ · See more »

Category theory

Category theory formalizes mathematical structure and its concepts in terms of a labeled directed graph called a category, whose nodes are called objects, and whose labelled directed edges are called arrows (or morphisms).

New!!: Covariance and contravariance (computer science) and Category theory · See more »

Closure (computer programming)

In programming languages, a closure (also lexical closure or function closure) is a technique for implementing lexically scoped name binding in a language with first-class functions.

New!!: Covariance and contravariance (computer science) and Closure (computer programming) · See more »

Common Lisp Object System

The Common Lisp Object System (CLOS) is the facility for object-oriented programming which is part of ANSI Common Lisp.

New!!: Covariance and contravariance (computer science) and Common Lisp Object System · See more »

Covariant return type

In object-oriented programming, a covariant return type of a method is one that can be replaced by a "narrower" type when the method is overridden in a subclass.

New!!: Covariance and contravariance (computer science) and Covariant return type · See more »

D (programming language)

D is an object-oriented, imperative, multi-paradigm system programming language created by Walter Bright of Digital Mars and released in 2001.

New!!: Covariance and contravariance (computer science) and D (programming language) · See more »

Eiffel (programming language)

Eiffel is an object-oriented programming language designed by Bertrand Meyer (an object-orientation proponent and author of Object-Oriented Software Construction) and Eiffel Software.

New!!: Covariance and contravariance (computer science) and Eiffel (programming language) · See more »

First-class function

In computer science, a programming language is said to have first-class functions if it treats functions as first-class citizens.

New!!: Covariance and contravariance (computer science) and First-class function · See more »

Function overloading

In some programming languages, function overloading or method overloading is the ability to create multiple methods of the same name with different implementations.

New!!: Covariance and contravariance (computer science) and Function overloading · See more »

Function type

In computer science, a function type (or arrow type or exponential) is the type of a variable or parameter to which a function has or can be assigned, or an argument or result type of a higher-order function taking or returning a function.

New!!: Covariance and contravariance (computer science) and Function type · See more »

Functor

In mathematics, a functor is a map between categories.

New!!: Covariance and contravariance (computer science) and Functor · See more »

Higher-order function

In mathematics and computer science, a higher-order function (also functional, functional form or functor) is a function that does at least one of the following.

New!!: Covariance and contravariance (computer science) and Higher-order function · See more »

Inheritance (object-oriented programming)

In object-oriented programming, inheritance is the mechanism of basing an object or class upon another object (prototypal inheritance) or class (class-based inheritance), retaining the same implementation.

New!!: Covariance and contravariance (computer science) and Inheritance (object-oriented programming) · See more »

Java (programming language)

Java is a general-purpose computer-programming language that is concurrent, class-based, object-oriented, and specifically designed to have as few implementation dependencies as possible.

New!!: Covariance and contravariance (computer science) and Java (programming language) · See more »

Java Platform, Standard Edition

Java Platform, Standard Edition (Java SE) is a computing platform for development and deployment of portable code for desktop and server environments.

New!!: Covariance and contravariance (computer science) and Java Platform, Standard Edition · See more »

John C. Reynolds

John Charles Reynolds (June 1, 1935 – April 28, 2013) was an American computer scientist.

New!!: Covariance and contravariance (computer science) and John C. Reynolds · See more »

Joshua Bloch

Joshua J. Bloch (born August 28, 1961) is an American software engineer and a technology author, formerly employed at Sun Microsystems and Google.

New!!: Covariance and contravariance (computer science) and Joshua Bloch · See more »

Liskov substitution principle

Substitutability is a principle in object-oriented programming stating that, in a computer program, if S is a subtype of T, then objects of type T may be replaced with objects of type S (i.e. an object of type T may be substituted with any object of a subtype S) without altering any of the desirable properties of the program (correctness, task performed, etc.). More formally, the Liskov substitution principle (LSP) is a particular definition of a subtyping relation, called (strong) behavioral subtyping, that was initially introduced by Barbara Liskov in a 1987 conference keynote address titled Data abstraction and hierarchy.

New!!: Covariance and contravariance (computer science) and Liskov substitution principle · See more »

Luca Cardelli

Luca Andrea Cardelli FRS is an Italian computer scientist who is an Assistant Director at Microsoft Research in Cambridge, UK.

New!!: Covariance and contravariance (computer science) and Luca Cardelli · See more »

Martin Odersky

Martin Odersky (born 5 September 1958) is a German computer scientist and professor of programming methods at École Polytechnique Fédérale de Lausanne (EPFL) in Switzerland.

New!!: Covariance and contravariance (computer science) and Martin Odersky · See more »

Method overriding

Method overriding, in object-oriented programming, is a language feature that allows a subclass or child class to provide a specific implementation of a method that is already provided by one of its superclasses or parent classes.

New!!: Covariance and contravariance (computer science) and Method overriding · See more »

Multiple dispatch

Multiple dispatch or multimethods is a feature of some programming languages in which a function or method can be dynamically dispatched based on the run-time (dynamic) type or, in the more general case some other attribute, of more than one of its arguments.

New!!: Covariance and contravariance (computer science) and Multiple dispatch · See more »

OCaml

OCaml, originally named Objective Caml, is the main implementation of the programming language Caml, created by Xavier Leroy, Jérôme Vouillon, Damien Doligez, Didier Rémy, Ascánder Suárez and others in 1996.

New!!: Covariance and contravariance (computer science) and OCaml · See more »

Parametric polymorphism

In programming languages and type theory, parametric polymorphism is a way to make a language more expressive, while still maintaining full static type-safety.

New!!: Covariance and contravariance (computer science) and Parametric polymorphism · See more »

Polymorphism (computer science)

In programming languages and type theory, polymorphism (from Greek πολύς, polys, "many, much" and μορφή, morphē, "form, shape") is the provision of a single interface to entities of different types.

New!!: Covariance and contravariance (computer science) and Polymorphism (computer science) · See more »

Programming language

A programming language is a formal language that specifies a set of instructions that can be used to produce various kinds of output.

New!!: Covariance and contravariance (computer science) and Programming language · See more »

Robustness principle

In computing, the robustness principle is a design guideline for software: The principle is also known as Postel's law, after Jon Postel, who wrote in an early specification of TCP: In other words, programs that send messages to other machines (or to other programs on the same machine) should conform completely to the specifications, but programs that receive messages should accept non-conformant input as long as the meaning is clear.

New!!: Covariance and contravariance (computer science) and Robustness principle · See more »

Sather

Sather is an object-oriented programming language.

New!!: Covariance and contravariance (computer science) and Sather · See more »

Scala (programming language)

Scala is a general-purpose programming language providing support for functional programming and a strong static type system.

New!!: Covariance and contravariance (computer science) and Scala (programming language) · See more »

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.

New!!: Covariance and contravariance (computer science) and Subtyping · See more »

Type constructor

In the area of mathematical logic and computer science known as type theory, a type constructor is a feature of a typed formal language that builds new types from old ones.

New!!: Covariance and contravariance (computer science) and Type constructor · See more »

Type inference

Type inference refers to the automatic detection of the data type of an expression in a programming language.

New!!: Covariance and contravariance (computer science) and Type inference · See more »

Type system

In programming languages, a type system is a set of rules that assigns a property called type to the various constructs of a computer program, such as variables, expressions, functions or modules.

New!!: Covariance and contravariance (computer science) and Type system · See more »

Undecidable problem

In computability theory and computational complexity theory, an undecidable problem is a decision problem for which it is known to be impossible to construct a single algorithm that always leads to a correct yes-or-no answer.

New!!: Covariance and contravariance (computer science) and Undecidable problem · See more »

Unified Modeling Language

The Unified Modeling Language (UML) is a general-purpose, developmental, modeling language in the field of software engineering, that is intended to provide a standard way to visualize the design of a system.

New!!: Covariance and contravariance (computer science) and Unified Modeling Language · See more »

Wildcard (Java)

The wildcard ? in Java is a special type parameter that controls the type safety of the use of generic (parameterized) types.

New!!: Covariance and contravariance (computer science) and Wildcard (Java) · See more »

Redirects here:

Bivariance, Bivariance (computer science), Bivariant, Contravariance (computer science), Contravariance and covariance (computer science), Covariance (computer science), Covariant return types, Covariant type, Invariance (computer science), Nonvariance, Nonvariance (computer science), Nonvariant, Parameter covariance, Variance (computer science), Variance annotation.

References

[1] https://en.wikipedia.org/wiki/Covariance_and_contravariance_(computer_science)

OutgoingIncoming
Hey! We are on Facebook now! »