Mon, 15 Mar 2010

memoize done right

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.

See more ...

Published by Meikel Brandmeyer on 15 Mar 2010 23:53

Comments

Tue, 09 Mar 2010

The Rule of Three

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 clojure.core/memoize.

See more ...

Published by Meikel Brandmeyer on 09 Mar 2010 23:12

Comments

Sat, 06 Mar 2010

proxy – gen-class little brother

Clojure provides two basic ways to interface with the host platform. The more comprehending is gen-class which I touched in a previous post. It's little brother is proxy. Although less powerful it is more dynamic than gen-class. Let's see how it works…

See more ...

Published by Meikel Brandmeyer on 06 Mar 2010 21:35

Comments