Hacker News new | past | comments | ask | show | jobs | submit login

I was super excited to see this paper released. I've spent time with Python, Java, C#, Javascript and limited time on C and Rust. Clojure was the largest paradigm shifter by a large margin.

Having done concurrent programming in Java, and even implemented some concurrency primitives like semaphores, Clojure was incredible to use. For those that don't know, Clojure uses immutable data structures that mitigate concurrency issues. If you are curious how that's even practical, I highly recommend the paper and also reading about Persistent Data Structures. They reuse shared data, similar to how Git only tracks the delta's between commits, rather than multiple, full copies of the file.

On top of that, you up reducing lines of code by 60-70% of traditional Java or C#.




> They reuse shared data, similar to how Git only tracks the delta's between commits, rather than multiple, full copies of the file.

I learned about immutable data structures at Rich's conference talk years ago, and the whole concept blew my mind as well. However, what you said above is not strictly correct. The idea is not to store deltas (which is what Subversion does), but immutable copies of objects (in case of Git identified by their SHA-1) that can be used to build multiple versions of a hierarchical data structure (e.g. a list, tree or hash map). Git commit is basically a tree of other objects with some metadata. The problem with deltas is that they need to be iteratively applied to some base snapshot which requires computation (and probably a cache as well), while immutable objects are easily accessible in constant time.


Agree. Probably should’ve used a more solid example, but was just trying to convey the essence I suppose.


No worries, I fully agree with the rest and just wanted to clarify things for others, not nitpick.




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

Search: