25% developed

Type-oriented programming

From Wikibooks, open books for an open world
Jump to navigation Jump to search
Decorative programming icon.
Decorative programming icon.
Type-oriented programming
A programming paradigm

Type-oriented programming is a paradigm spanning both object-oriented and functional approaches to writing statically typed code. Most programming languages in this category make extensive use of subtyping and parametric polymorphism.

This material introduces the basic concepts, most of them known from object-oriented and functional languages, and then goes on to explain some more involved techniques used in languages with powerful type systems.

Table of Contents[edit | edit source]

Basic concepts

Types and properties

Instance methods

Type methods

Restricted properties

Function types


Type operators

Type arguments

‘Self’ at the type level

Type variance

Bounded type arguments

Types of higher kinds



Monad transformers