Platonic C# - Managing Referential Transparency through Unique Types

The idea of Platonic C# is to enforce referential transparency within the context of C#, by enforcing a set of rules around defaulting to immutability of data structures and requiring uniqueness of instances of mutable types.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Any other similar approaches?

Anyone aware of recent work being done with uniqueness type systems? On the surface, it seems like an effective way to patch referential transparency onto an imperative object-oriented language. I wonder if the stated rules are complete enough to enforce referential transparency and safety, and whether a static analyzer can enforce them sufficiently.

Capabilities for Uniqueness and Borrowing

There is a presentation from 2010 by by Philipp Haller and Martin Odersky: "Capabilities for Uniqueness
and Borrowing

The Pony language may have something similar. They have a paper: "Deny Capabilities for Safe, Fast Actors".