Letlang — Roadblocks and how to overcome them

David Delassus
7 min readJun 7, 2023


I’ve been working on and off on my own programming language, Letlang, for a while now. You may have already read a bit about it in my previous articles.

I have made a lot of progress on the design of the runtime, and the features I want.

But we’re still nowhere near something “stable”. I met some roadblocks which makes me rethink the semantics and the syntax as a consequence.

In my opinion, the syntax needs to reflect clearly the semantics of the language. The syntax is “derived” from the semantics.

In this article, I’ll expose some of the roadblocks I’ve met and what solution I have thought of.

Quick Recap: The type system

The type system of Letlang is dynamic and enforced at runtime. This is because of the very nature of what a “type” is in Letlang.

For a quick reminder: Values do not have a type, instead they belong to a collection, called a “class” (inspired from proper classes in set theory). The class defines the constraints a value must respect to be considered “part of the class”.

The example I like to give is with the classes even and odd :

  • even : all integers n such as n % 2 = 0