r/ProgrammingLanguages • u/jimbobmcgoo • Jul 23 '26
Will we see another fundamental programming language feature as revolutionary as the borrow checker?
That is I am mainly curious about compile time features that you design a whole language around rather than optimisations/features that could be applied to most languages. I am mainly inquiring about things that could offer additional robust safety/performance guarantees at compile time rather than runtime. Ideally not things that just offer similar effects to the borrow checker with less restrictive tradeoffs
61
Upvotes
View all comments
Show parent comment
20
u/Diffidente Jul 23 '26 edited Jul 23 '26
My experimental language called Lain (3y in development but not ready to share yet) implements exactly all of them!!!
It has:
For the Linear Type System I inverted the Rust paradigm, using explicit move semantics instead of implicit. And implicit shared borrows instead of explicit.
An example:
Here you can see the use of refinement types in
mandn, the use of a mutable borrow invar arr1, a shared borrows inarr2, and dependent types in the array dimensions[m + n]and[n].