JuliaCon 2025

An Intersection of Concerns: Extended Types for Julia
2025-07-23 , Main Room 1 (Main stage)

What if Julia types were more than struct, Tuple, Union{} and where T?

In this talk, I'll dare to dream of an extension of Julia with powerful type features like intersection types (TypeScript), sum types (Rust), interface types (many languages), etc.

What are the implications for a user, and for the compiler? Building on the intuition of types-as-sets, we'll build a simple subtyping algorithm, explore the consequences for inference, and show how this all connects to real Julia code.


Semantic subtyping is a frequently-cited basis for Julia's type system, but much more time has been spent explaining the particularities of Julia's types (e.g. invariance vs. covariance) versus the fundamental semantic subtyping features that Julia supports and those that have been left out.

We've built a new subtyping algorithm that gives up some complexity of where T and inherits the ability to extend Julia with a variety of interesting features such as intersection / negation types, sum types, and interface types. This talk will explore the details of that algorithm, making frequent references to major languages with similar type system features.

A compiler engineer at JuliaHub.

This speaker also appears in: