This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-07-08
Channels
- # announcements (5)
- # aws (15)
- # babashka (7)
- # beginners (138)
- # bristol-clojurians (2)
- # chlorine-clover (11)
- # cider (9)
- # clara (4)
- # clj-kondo (17)
- # cljsrn (20)
- # clojars (1)
- # clojure (73)
- # clojure-europe (17)
- # clojure-italy (1)
- # clojure-nl (9)
- # clojure-spec (4)
- # clojure-uk (9)
- # clojurescript (43)
- # data-science (1)
- # datomic (87)
- # emacs (2)
- # figwheel-main (30)
- # fulcro (71)
- # helix (2)
- # hugsql (4)
- # jackdaw (5)
- # jobs (3)
- # jobs-discuss (31)
- # juxt (5)
- # kaocha (6)
- # lein-figwheel (16)
- # leiningen (1)
- # luminus (4)
- # malli (2)
- # meander (54)
- # music (8)
- # nrepl (12)
- # observability (28)
- # off-topic (85)
- # pathom (11)
- # re-frame (99)
- # reitit (9)
- # ring (1)
- # rum (6)
- # sci (11)
- # shadow-cljs (102)
- # sql (22)
- # tools-deps (10)
- # vim (65)
- # xtdb (14)
Random thought (rooted in how many of these I have due to react) that I wanted to get some basic feedback on before opening an issue: linting unused arguments when calling a function which destructures in it's arglist.
(defn foo [{:keys [a b]}])
...
(foo {:c 10})
For react, this is a lot of code because of props.
Obviously it only works for literal maps, but I still think it's pretty useful for that?
I don't think Clojure works that way in most cases: data is passing through all the time which is not used in one place but maybe down the line
I think in most cases Clojure doesn't care about extra keys, except maybe in edges of systems
Wouldn't be an error, for sure. It's for when something is removed from use I guess.
Hmm, which would be a breaking change I guess. Only in internal use is it not. So perhaps not a good choice. But then again, arglists are warned about.
The change that got me here was removing a keyword arg from a component, and then replacing uses of that arg with a different one.
@dominicm it's part of the type stuff: https://github.com/borkdude/clj-kondo/blob/master/doc/types.md so you explicitly have to state the required and optional keys for a function's argument