Liking cljdoc? Tell your friends :D

clojure+.util


bb?clj

source

color?clj

(color?)
source

if-clojure-version-gtecljmacro

(if-clojure-version-gte version if-branch)
(if-clojure-version-gte version if-branch else-branch)
source

if-java-version-gtecljmacro

(if-java-version-gte version if-branch)
(if-java-version-gte version if-branch else-branch)
source

if-not-bbcljmacro

(if-not-bb if-branch)
(if-not-bb if-branch else-branch)
source

rebind-dynamiccljmacro

(rebind-dynamic var f & args)
source

rebind-dynamic-implclj

(rebind-dynamic-impl var f args)

Clojure creates a lot of layers of dynamic bindings for data-readers (e.g. clojure.main, require, Compiler/load etc). Some of them are not directly nested, but instead siblings. This causes issues even in simplest cases: e.g. loading namespace vs executing a function from that namespace, latter won't see changes made by former.

This might lead to very confusing behaviors, like:

(print/install!)

(defn -main [& args]
  (println *data-readers*))
;; => {}

Modifying root binding is not enough, as the changes don't automatically propagate down the stack. Here we are popping frames of dynamic vars stack one by one, setting desired readers at every level, and then putting the original stack back.

Clojure creates a lot of layers of dynamic bindings for *data-readers*
(e.g. clojure.main, require, Compiler/load etc). Some of them are not
directly nested, but instead siblings. This causes issues even in simplest
cases: e.g. loading namespace vs executing a function from that namespace,
latter won't see changes made by former.

This might lead to very confusing behaviors, like:

    (print/install!)

    (defn -main [& args]
      (println *data-readers*))
    ;; => {}

Modifying root binding is not enough, as the changes don't automatically
propagate down the stack. Here we are popping frames of dynamic vars stack
one by one, setting desired readers at every level, and then putting
the original stack back.
sourceraw docstring

runtime-versionclj

source

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
←Move to previous article
→Move to next article
Ctrl+/Jump to the search field
× close