Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Written by Prashant Basnet
π Welcome, Youβve Landed on My Signature Page.
Iβm a Software Development Engineer passionate about building scalable systems and solving problems.
Beyond engineering, I enjoy sharing ideas and documenting lessons so others can learn and build on them.This space is my digital notebook, a place where I reflect on what Iβm learning and creating.
In type theory, sub typing denoted by (<:) is a relation that describes when one type can be used in place of another type. It's more like flexible version of type equality.
The notation we are seeing is about function types and record types:
For example:
A function type A -> B means a function that takes an input of type A and returns a type B.
So when we are seeing something like:
it's asking Can a function that takes Xy and returns X be considered a subtype of a function that takes a Y and return XY?
The rules for determining this involves:
1. Contra variance of input types (domains)