This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-09-13
Channels
- # announcements (1)
- # babashka (12)
- # beginners (10)
- # biff (9)
- # calva (2)
- # cherry (21)
- # cider (14)
- # clj-commons (76)
- # clj-kondo (8)
- # clj-on-windows (34)
- # cljs-dev (5)
- # clojure (48)
- # clojure-austin (7)
- # clojure-europe (97)
- # clojure-nl (1)
- # clojure-norway (14)
- # clojure-uk (22)
- # clojurescript (137)
- # conjure (33)
- # cursive (4)
- # datalevin (1)
- # deps-new (4)
- # devcards (2)
- # duct (3)
- # events (1)
- # fulcro (12)
- # graphql (9)
- # hyperfiddle (16)
- # jobs (8)
- # kaocha (1)
- # leiningen (6)
- # lsp (39)
- # malli (38)
- # membrane (20)
- # nbb (68)
- # observability (7)
- # off-topic (49)
- # pathom (11)
- # polylith (8)
- # portal (22)
- # re-frame (6)
- # releases (1)
- # remote-jobs (2)
- # shadow-cljs (24)
- # spacemacs (2)
- # squint (6)
- # xtdb (7)
FWIW I’ve been playing around with a new j/js
macro in js-interop, inspired by these experiments. An example namespace written this way - https://gist.github.com/mhuebert/11407a1c0a1761daf01df0436c66db3d
• All destructuring is ^js
by default in fn/defn/let
• All literals are objects/arrays (except for stuff that should not be rewritten so that clj forms like fn/defn/let/loop still work)
I did not go so far as to automatically rebind things like assoc/assoc!/merge and so on, still use j/*
variants
so far I’m finding it quite pleasing to work with for very interop-heavy code. without j/js
, that ns would be absolutely full of ^js
hints and j/let
, j/fn
and so on which I find tiresome to write and read. One can opt out with ^clj
or ^:clj
metadata at any point.
in nbb, the js-interop macros mostly fall back on the runtime behavior since it's not a compiler
in terms of behaviour the compile time stuff is only important for google closure related nonsense (key renaming)
it will always be a bit of a finnicky thing because it needs “knowledge” of other macros in order to know what can (not) be parsed as js literal