External Publication
Visit Post

Pure Borrow: Linear Haskell Meets Rust-Style Borrowing

Haskell Community [Unofficial] April 23, 2026
Source

This post is an excellent demonstration of a potential future for this style, and while I don’t think I’ve got any use case for it in the near future, I hope to find one!

Thanks! We are really encouraged by your comment

Out of interest, do you think that Pure Borrow could have performance benefits, or is the focus on safety which allows us to go faster?

Good question! The current primal focus of Pure Borrow is on the purity and safety, I think there are many cases where Pure Borrow can also contribute to the performance, just as with ST-monads. Pure Borrow morally enjoys all the feature provided by ST-monad, including pure mutable reference and mutable vectors. With the help from linear types, Pure Borrows has parallelism in addition, and borrows allow us fine-grained R/W permission management. In other words, Pure Borrow would expand the range of the fast destructive programs that can be written as a pure function. In this sense, Pure Borrow can contribute the performant programming in Haskell, I think

Discussion in the ATmosphere

Loading comments...