My recent post on how to make memoize more flexible has sparked an interesting discussion about the actual implementation. Christophe Grand and Eugen Dück joined to discuss almost everything Clojure gives you as a tool to handle concurrency. Don't miss the evolution of a quite simple function in a non-concurrent world to a quite complex function in case multiple threads of execution are involved.
As Joshua Bloch says in his talk „API Design and why it matters“:
Write multiple plug-ins before release!
- If you write one, it probably won't support another.
- If you write two, it will support more with difficulty.
- If you write three, it will work fine.
In a recent post of mine on the Clojure group I encountered
exactly this rule. So let's explore it using the example of
Note: You might also be interested in the follow-up.