This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-04-22
Channels
- # announcements (2)
- # architecture (33)
- # babashka (4)
- # beginners (445)
- # bristol-clojurians (10)
- # calva (23)
- # cider (43)
- # clj-kondo (36)
- # cljs-dev (13)
- # cljsrn (20)
- # clojure (136)
- # clojure-argentina (8)
- # clojure-dev (1)
- # clojure-europe (18)
- # clojure-germany (1)
- # clojure-italy (5)
- # clojure-nl (45)
- # clojure-spec (66)
- # clojure-uk (29)
- # clojurescript (69)
- # conjure (157)
- # cursive (2)
- # datomic (216)
- # emacs (10)
- # exercism (4)
- # figwheel-main (8)
- # fulcro (30)
- # graphql (21)
- # hoplon (5)
- # kaocha (7)
- # leiningen (3)
- # luminus (4)
- # music (1)
- # off-topic (24)
- # pathom (10)
- # re-frame (19)
- # reagent (11)
- # reitit (16)
- # remote-jobs (1)
- # ring-swagger (5)
- # rum (7)
- # shadow-cljs (125)
- # spacemacs (8)
- # sql (9)
- # tools-deps (12)
I'm bike-shedding with myself over some keyword names in a library...
:debug
vs :debug?
:throw
vs :throw?
The reason I'm leaning towards the first ones is: what if I want to extend the value to more than a boolean later? like {:throw {:exclude #{400}}
Then the question mark suddenly doesn't make sense anymore.
it still looks like a predicate. why does the ?
stop making sense?
yeah, that's also not true, so there you have it: two reasons not to use the question mark?
There is a thread about it here: https://github.com/bbatsov/clojure-style-guide/issues/182#issuecomment-516303299
I use the non ?
version generally when there is extra information because I will find (:excludes throw?) harder to understand later
For keywords, I'd definitely avoid ?
. For (local) symbols that represent pure Boolean values, I'm on the fence. For function that return pure Boolean results, use ?
. Years ago, clojure.java.jdbc had some keywords that ended in ? and several of them eventually came to allow non-Boolean truthy values. So when I wrote next.jdbc I decided that none of the keywords/options would end in
?` even if they only accept true/false today.
@seancorfield Cool, same as almost a year ago then ๐ https://github.com/bbatsov/clojure-style-guide/issues/182#issuecomment-516969043
Yeah, I think it took me seven or eight years to arrive at that position but it hasn't changed much in the last two to three years ๐
At work we have several question marks in API options, but it looks pretty weird if you call that API with JSON
Yeah, we have legacy code that calls into Clojure from the JVM so even with predicates you end up calling stuff like
๐
I want to set up an online ordering website for my dadโs bakery
anyone got success stories for setting up something quickly?
I was looking into using Hugo with some CMS tools
@christian.gonzalez I did something similar recently, using Hugo, forestry and snipcart. Worked great ๐
Sure, donโt expect too much, itโs a simple site for my niece: https://github.com/jelmerderonde/ester
it looks great!
thanks for sharing