Get the latest tech news

A type system for RCL, part 2: The type system


I am adding a type system to RCL, my configuration language. In this post I explain how the type system works. It is based on lattices and features a generalized subtype check.

In this series we take a closer look at the type system, because I think it is interesting, but also because I hope that exposure to the wider PL community can help me to validate some of the ideas, or find problems with them. A lattice — strictly speaking a join-semilattice in this case — is a partially ordered set with an operation called join that returns the least upper bound of two elements. Especially for a list of records, incrementally constructing the inferred type and then joining those for every element, is a lot to churn through and allocate — even if algorithmically it can be done in linear time.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of RCL

RCL

Photo of type system

type system