| ▲ | gleenn 3 hours ago | |
> I personally find OOP to be the most intuitive for large scale systems design, but that's just me. The beauty of Clojure shines through when you want to change something that cuts through a large part of a large project. If you are using mutable data, you may end up with many bugs from various pieces of code mutating objects inconsistently. With Clojure, if someone hands you data, you can't possibly break some distant piece of code by updating an object: it's just not possible because you only ever make fast, updated copies. The more complicated your codrbase gets, the more this benefit is realized. I actually kind of think of it as an easier mechanism with similar outcomes to Rust's borrow checker. Only one piece of code ever owns the data so things end up much safer. However it is way easier to use IMHO because you just know that zero people own anything and everyone can read everything. It also makes converting some code to be multi-threaded extremely easily and with some constraints guaranteeably correct. Lots of dovetailing features neatly put together for both clarity and less bugs and more usable cores which are probably sitting idle. | ||