clojurescript 2025-11-19

new interop idea, cljs.proxy - https://github.com/clojure/clojurescript/commit/19288496e44915d675aa30610cb9fc52427bdc80 - very experimental but seems very promising. Please give it a try!

👀 6
6

For more legible code, I might wrap builder in functions named array-like and object-like.

Interestingly, I thought I'd seen something similar before and found a read-only variant of this idea after searching my bookmarks: https://gist.github.com/viebel/6086821294611d4be3f45ccc28060f2e by @viebel. Nice to have this capability in the standard library!

basically you can just pass maps / vectors to JS and they will appears as object & array-like. It's done lazily so unlike clj->js you're not paying for all the conversion, garbage collection etc.

👍 1
🤯 2

in the proxied map case, getting a key (especially one that has been seen before) has a very, very low overhead over doing it in CLJS

(meaning aCljsMap["foo"] or aCljsMap.foo is very close to the performance of (get a-cljs-map :foo))