This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-02-25
Channels
- # announcements (6)
- # asami (1)
- # babashka (80)
- # beginners (89)
- # bitcoin (1)
- # calva (30)
- # cider (33)
- # clj-kondo (1)
- # cljsrn (45)
- # clojars (5)
- # clojure (60)
- # clojure-australia (1)
- # clojure-dev (9)
- # clojure-europe (133)
- # clojure-italy (7)
- # clojure-nl (6)
- # clojure-uk (44)
- # clojurescript (11)
- # conjure (1)
- # data-oriented-programming (2)
- # datahike (13)
- # datascript (4)
- # datomic (19)
- # deps-new (29)
- # depstar (5)
- # duct (39)
- # fulcro (8)
- # girouette (1)
- # helix (10)
- # honeysql (17)
- # jobs (5)
- # jobs-discuss (2)
- # leiningen (6)
- # lsp (51)
- # malli (60)
- # meander (37)
- # membrane (8)
- # off-topic (31)
- # overtone (3)
- # pathom (36)
- # re-frame (8)
- # reagent (30)
- # remote-jobs (2)
- # sci (1)
- # sql (32)
- # startup-in-a-month (3)
- # testing (3)
- # tools-deps (7)
- # xtdb (7)
Is it possible to use the JavaScript operators typeof
or delete
via interop with CLJS?
Is there a way to make this work in CLJS?
cljs.user=> (let [x IDeref] (satisfies? x (atom 0)))
false
reading the source of the satisfies?
macro, it looks like it relies on using the analyzer to get the name of the protocol so that it knows what attribute to look up on the object being checked
in order to change this, I think you would have to emit the name of the protocol in code somewhere where you could read it at runtime
yeah, I worked around this by using cond = on the protocol object and then hardcoding the satisfies...
emitting the name in code and trying to use it at runtime, would break advanced optimizations where the attribute on the object gets renamed. emitting the check via a macro ensures that the check stays coherent after optimization
whoops, wrong channel. 😬