6 ms·
Clojure isn't an optimizing compiler because the JVM is the optimizing compiler. Clojure datastructures are all declared static final which allows the JVM to wo
by swannodette 17y ago
Clojure isn't an optimizing compiler because the JVM is the optimizing compiler. Clojure datastructures are all declared static final which allows the JVM to work a lot of magic.
I've been using Clojure for a year and half and never run into such a bug. You learn quickly that you lost all of the benefits of persistent datastructures if you're putting mutable objects into them.
As a side note, Rich Hickey has been working on a project called "cells" which allows you to use even unsafe mutable Java objects with the same safe concurrency guarantees as Clojure persistent data structures.