Type-oriented programming

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.

Decorative programming icon.
Decorative programming icon.
Type-oriented programming
A programming paradigm

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
Basic concepts

Types and properties

Instance methods

Type methods

Restricted properties

Function types

Proxies

Type operators

Type arguments

‘Self’ at the type level

Type variance

Bounded type arguments

Types of higher kinds

Functors

Monads

Monad transformers