This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-10-19
Channels
- # announcements (7)
- # aws (4)
- # aws-lambda (1)
- # babashka (19)
- # beginners (60)
- # calva (9)
- # chlorine-clover (3)
- # cider (15)
- # clj-kondo (17)
- # clojure (34)
- # clojure-czech (1)
- # clojure-europe (96)
- # clojure-nl (2)
- # clojure-uk (46)
- # clojurescript (20)
- # css (4)
- # cursive (58)
- # data-science (3)
- # datascript (3)
- # datomic (42)
- # depstar (30)
- # dirac (4)
- # emacs (1)
- # etaoin (5)
- # events (1)
- # figwheel-main (30)
- # fulcro (6)
- # helix (9)
- # jobs (1)
- # lumo (3)
- # malli (27)
- # off-topic (15)
- # pathom (11)
- # programming-beginners (6)
- # reitit (6)
- # rewrite-clj (11)
- # shadow-cljs (14)
- # sql (1)
- # tools-deps (18)
- # utah-clojurians (3)
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.