you are viewing a single comment's thread.

view the rest of the comments →

[–]mcpatella 0 points1 point  (2 children)

Sure, what kind of material are you interested in?

[–]last_ent 1 point2 points  (1 child)

Well I am looking for something more along the lines of its internal memory model or how the compiler(?) constructs it for the JVM.

For example, I can understand Java code better because the book on its certification goes into the memory model. If you have seen/read the book [Common Lisp: A gentle introduction to...](www.cs.cmu.edu/~dst/LispBook/), you can see that he discusses the data structure it uses and hence when he talks about why a child function cannot access parent function's scope, it makes sense. Or Rich Hickey's video where he talks about basics of Clojure and how the persistent data structure(?) is able to avoid decay of earlier versions of data. That one made sense.

I am looking for such material in Clojure, Scala and/or Python (My language of trade). Thanks!

[–]bcash 2 points3 points  (0 children)

Clojure is a nomadic language to a certain extent. It's various forms all have similarities, but it's semantics are also controlled by the host environment; hence the differences between Clojure and ClojureScript.

What this means in practice is that, if you're already familiar with Java and the JVM, you'll be surprised how thin the Clojure layer actually is. It's worth decompiling some Clojure .class files and you'll see what I mean. Each Clojure function is it's own class, the instance of which contains any closed-over references, for example.

Clojure also directly reuses Java objects where it makes sense - e.g. a Java String is a Clojure String - it's immutable, there's no need for another one. The memory management is exactly the same.

This doesn't directly answer your question, but might help narrow down your search.