|
|
|
|
|
by jaccarmac
1296 days ago
|
|
No expert on Clojure semantics, but I'm pretty sure what's being discussed is common to almost all runtime environments. When you pass an argument to a function, the function doesn't keep track of the name of whatever you pass, it keeps track of the thing you pass. (A few languages bind late enough that you are essentially passing names during function invocation, but AFAIK not many.) The difference is that when you redefine a function in Clojure, you're not updating the memory location of the old function but updating the function that a given var (one of Clojure's synchronization primitives) points to. The var quote, then, is roughly the equivalent of passing a pointer, while the naked syntax is roughly like passing a dereferenced pointer. I find the "save" language in TFA a bit confusing. |
|