Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

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?

share|improve this question
    
Can you make your question a little more specific? What, for example, do you already know about locking with unique types and where is your own knowledge insufficient? –  Robert Harvey May 6 at 22:40
    
> What, for example, do you already know about locking with unique types I don't know anything about locking with unique types -- I don't really know how safe parallelism works with unique types and I'd like to know if there are any resources on the topic. –  Ricky Stewart May 6 at 22:49
1  
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.