← HomeLogin
An experimental concurrent language with linear types
~dev.source~securityconcurrencyprogramming languages
github.com Nov 28, 2025Tildes

Summary

Par (⅋) is an experimental concurrent programming language. It's an attempt to bring the expressive power of linear logic into practice.

Not to be confused with another language with the same name. (And sometimes hard to search for, since it's a common word in French.)

I don't think I will ever use this since it's pretty experimental. Go seems like a more practical choice for this sort of thing? But reading through the documentation, it's interestingly weird.

So far, Par seems clearly a functional language. Yes, it has linear types, and some unusual features, like choices, and begin/loop for recursive and iterative types, instead of the usual recursion by name. But, it’s still clearly a functional language.

However, it is not! At its core, Par is a process language! [...] all values in Par are channels. Yes, functions, pairs, choices, all of them. It will become much clearer as we understand this process syntax.

...

Par offers syntax features to seamlessly switch between expressions and processes, so that you can always apply that which fits best, granularly.

Most of the time, it’s not desirable to use process syntax for the whole program. Instead, it’s usually best to just insert some commands where appropriate. That’s what the do expression is all about. In real Par programs, most of the explicit commands will be found in do expressions. And, since we’re already familiar with expression syntax, do expressions are a good place to start adding commands to otherwise expression-based programs.

...

Every command has a subject, a channel — usually a local variable — that the command is operating on. After executing the command, the subject changes its type. This is the important distinction from imperative statements. It’s the distinction that brings proper, and ergonomic session typing to this imperative-looking process syntax.

...

For a function type, we have the send command. It’s just like a function call — but as a command, it doesn’t have a result. Instead, it turns the subject itself to the result.

…

The key is this: If the whole chan expression has type T, then inside the block, inner has type dual T.

We’ll explore the details of dual types in the next section, but for now, here’s the intuition: A type and its dual are two opposite side[s] of communication. If one side offers something, the other one requires it, and vice versa.