Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

How? Please refute this claim: "Transients have very little, if anything, to do with types."

Why would I claim this? Transients are about the internal nature of a function but have nothing to do with the return value or type. See "Transient data structures are a solution to this optimization problem that integrates with the Clojure model and provides the same thread safety guarantees you expect of Clojure." at http://clojure.org/transients



Transients are a different type from the corresponding persistent, as seen by the fact that different operations are supported. Clojure's programmer-facing type system doesn't expose the transient type explicitly, but the semantics certainly implements a linear type system.

From the page you linked:

"""

Capture return value, use for next call

Not persistent, so you can't hang onto interim values or alias

"""

From Rich Hickey himself: http://www.infoq.com/interviews/hickey-clojure-protocols

More context: http://c2.com/cgi/wiki?LinearTypes




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: