cljs-dev

borkdude 2026-01-17T13:38:38.539579Z

I came across this macro:

(defmacro js-for
  "Like for, but efficiently builds up a js array."
  {:style/indent 1}
  [binding body]
  `(let [^js arr# (js/Array.)]
     (doseq ~binding (.push arr# ~body))
     arr#))
Don't look at the implementation. What I'm just interested in here. When evaluating this macro, the arr# symbol has tag user/js. Is this accepted by the CLJS compiler as a hint or not (as opposed to just js). I don't think the hint is necessary here, but ok.

shaunlebron 2026-01-18T19:54:27.595809Z

https://cljs.github.io/api/syntax/js-tag

borkdude 2026-01-18T19:55:50.440879Z

Yeah so user/js doesnt mean anything

dnolen 2026-01-17T13:48:56.008959Z

not necessary