Demystifying Function Sub-typing

What is a Type for a function? When can you say that a function is a sub-type of another function? Why should you even bother?

Function sub-typing is one of the most confusing areas of FP. In this talk, I'll take a deep dive and explain the core concepts of function types which applies to many different languages. More than just explaining the mere rules, I will be deriving those rules in a step-by-step fashion till the eureka moment so that you will never be confused again.

The topics covered:

  1. Sub-typing basics
  2. Covariance & Contravariance
  3. Function sub-typing
  4. Implementation gotchas in different languages (Java, Scala, Haskell, JavaScript)

Outline/Structure of the Talk

  1. Essential basics and an invented programming language for our discussion
  2. What is sub-typing
  3. Covariance & Contravariance
  4. Deriving the function sub-type
  5. Usage examples for function sub-types
  6. Implementation caveats in popular systems

Learning Outcome

Strong understanding of function sub-typing, useful in library design and contract modelling.

Target Audience

Anyone using FP, preferably strongly typed languages like Scala, Haskell etc.

Prerequisites for Attendees

Have a good understanding of FP concepts, especially First Class Functions and types.

schedule Submitted 1 month ago

Public Feedback

comment Suggest improvements to the Speaker

  • Liked Siddharth Kulkarni

    Siddharth Kulkarni - Functional Programming in Rust Lang

    45 Mins

    Rust is a new systems programming language that is garnering a lot attention from higher level programmers alike. It has a strong type system that enables some interesting functional programming patterns. Through this talk, I would like to demonstrate the Zero Cost Functional Abstractions in Systems Programming and Otherwise. The talk assumes intermediate level knowledge of FP principles and basic understanding of Rust Lang.