Prismatic/plumbing — pull request #78 by crisptrutski (2014-12-12 07:52:14+00:00)
Title: Define `update` only for previous Clojure(Script) releases

Refs: https://github.com/Prismatic/plumbing/issues/76

Since neither `resolve` nor `*clojurescript-version*` are available in the CLJS runtime, it seems that a macro is necessary.

@w01fe As an alternate, consider:

```
(defmacro defn-fallback
"Similar to defn, but no-op if the symbol already has a bound definition"
[name & args]
(let [existing (resolve name)]
(when-not (and existing (bound? existing))
`(defn ~name ~@args))))
```

This macro is slightly simpler, should just-work for CLR and other targets, and could provide reuse in the future (say, `defnk` coming into core in 1.8 :wink:).

Also defining a C style (`#ifndef`) macro in Clojure feels beyond cute to me.

Let me know if you'd prefer the alternate solution and I'll revise the PR.