This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-05-10
Channels
- # announcements (3)
- # babashka (16)
- # beginners (41)
- # biff (4)
- # calva (14)
- # circleci (1)
- # clj-http (24)
- # clj-kondo (9)
- # clj-on-windows (31)
- # cljs-dev (52)
- # clojure (162)
- # clojure-australia (10)
- # clojure-europe (52)
- # clojure-nl (2)
- # clojure-spec (1)
- # clojure-uk (5)
- # clojurescript (40)
- # conjure (6)
- # core-async (3)
- # cursive (5)
- # datalevin (11)
- # datomic (7)
- # emacs (12)
- # etaoin (19)
- # events (1)
- # figwheel-main (17)
- # fulcro (4)
- # graalvm (3)
- # gratitude (13)
- # honeysql (8)
- # introduce-yourself (7)
- # london-clojurians (1)
- # off-topic (9)
- # polylith (9)
- # rdf (1)
- # re-frame (21)
- # releases (5)
- # remote-jobs (4)
- # sci (28)
- # shadow-cljs (15)
- # spacemacs (2)
- # vim (4)
- # xtdb (15)
Hmm, this:
https://clojure.org/guides/repl/enhancing_your_repl_workflow#writing-repl-friendly-programs
would maybe be a reason to disable :redundant-fn-wrapper
by default. I've come across this situation a couple of times now. /cc @ghadi: what do you think?
What would be even more awesome is a linter that warns you about code being not repl-friendly, like #3 vs #4 at that link
I kinda prefer #4 to #2 there so the wrapper is still redundant compared to using the var
I think your caution regarding the linter is right however. I would surely refactor from 2 to 3 by default as I don't have this thing on my mind most of the time.
I just recently learned that #'
is "dangerous" in cljs and it's much safer to use a wrapper function (via Thomas Heller).
(but I much prefer #'
as the REPL-friendly approach in clj -- sounds like something I'll have to remember if I ever get back to writing cljs!)
@U04V70XH6 if you're writing #joyride scripts, #'
works just fine since vars are more like Clojure JVM in SCI, even in JS :)
Ah, good to know. Thank you!