I've been interested in uniqueness types as an alternative to monads in pure functional languages for some time; unfortunately, this is kind of an esoteric area of CS research and online resources about programming with uniqueness types are few and far between.It's obvious how uniqueness types may be used to implement stateful data structures like references (boxes) and arrays, though it escapes me how you might implement other common stateful data structures with them.Is it possible to implement, for example, locking with unique types?  Can uniqueness types be used to share mutable data across threads?  Is it possible to use unique types to build synchronization primitives (like mutexes), or is message passing necessary?
Using uniqueness types to implement safe parallelism
programming languages;functional programming;type systems;parallelism