anyone using a macro to omit ^:native ?
“omit” or “emit”? :thinking_face:
I don't think that's possible, because the metadata special character is processed at read time, before macro expansion. Think you'd need to do (with-meta ... {:native true})
#?(:clj
(defmacro $n [type & args]
(let [type (if (instance? clojure.lang.IObj type)
(with-meta type {:native true})
type)]
(helix/$
type @args))))`
does that work?
I do remember trying to do this at one point, I remember it being fiddly
I've coded today. It's woking as far I can see. I'm asking to know your thougths on this.
@geraldodev one minor thing about your macro, you should assoc that metadata on I think, rather than setting it.