2 ms·
To what extent is this already being done by other functional blanguages that have CoW mutability? This seems like a legal compiler optimization to make in most
by rocqua 2y ago
To what extent is this already being done by other functional blanguages that have CoW mutability?
This seems like a legal compiler optimization to make in most cases no?
- wittystick 2y agoClean has been doing this for nearly as long as people have been using monads, but it never got the attention Haskell did, which I think is quite unfortunate. Rather than implictly keeping track of references, uniqueness types are marked explicitly to inform that their values cannot be aliased. They can also be used with monads to improve ergonomics a bit. Granule has uniqueness types like Clean built onto a linear type system, which offers some additional advantages.
- projektfu 2y agoIs Clean being used anywhere? Last time I looked at it was 1999 and, while cool, I haven't ever heard of anyone using it.