3 ms·
Transients in Clojure are rather dynamically typed linear types. Rather than statically verifying that the types are linear, the runtime throws an exception at
by Blikkentrekker 6y ago
Transients in Clojure are rather dynamically typed linear types.
Rather than statically verifying that the types are linear, the runtime throws an exception at runtime when they be used in a non-linear way.
There are various functional programming languages that utilize linear types to implement mutation while otherwise retaining a pure interface.
- eyelidlessness 6y agoI appreciate the clarification. And giving it a more general name which I wasn’t aware of. I hope it was clear I was using an example and not trying to suggest this was somehow unique to Clojure. My point was to say that encapsulating mutability to provide an immutable interface with other desirable characteristics is actually commonplace.