This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-07-03
Channels
- # aleph (3)
- # beginners (139)
- # boot (3)
- # cider (12)
- # cljs-dev (18)
- # clojure (100)
- # clojure-dev (21)
- # clojure-dusseldorf (5)
- # clojure-germany (1)
- # clojure-italy (35)
- # clojure-nl (26)
- # clojure-spec (4)
- # clojure-uk (60)
- # clojurescript (11)
- # clojutre (4)
- # cursive (21)
- # data-science (21)
- # datomic (47)
- # editors (3)
- # emacs (2)
- # events (4)
- # figwheel (2)
- # fulcro (28)
- # jobs (27)
- # jobs-discuss (21)
- # lein-figwheel (3)
- # midje (2)
- # off-topic (20)
- # om-next (4)
- # onyx (10)
- # overtone (1)
- # pedestal (2)
- # portkey (14)
- # re-frame (71)
- # reagent (44)
- # reitit (11)
- # remote-jobs (1)
- # ring-swagger (4)
- # shadow-cljs (64)
- # spacemacs (11)
- # testing (2)
- # tools-deps (8)
- # vim (8)
I ran into surprising behaviour where a symbol does not get metadata when using the ^:some-key
syntax
(def map-meta-from-reader ^:foo {})
(def map-meta-explicit (with-meta {} {:foo true}))
(def symbol-meta-from-reader ^:foo 'a)
(def symbol-meta-explicit (with-meta 'a {:foo true}))
(meta symbol-meta-from-reader) ;; => nil
(meta symbol-meta-explicit) ;; => {:foo 1}
(meta map-meta-from-reader) ;; => {:foo true}
(meta map-meta-explicit) ;; => {:foo true}
@chrisblom ^:foo 'a is ^:foo (quote a), the eval of which is a. this is expected behavior. note that '^:foo a does what you're expecting above.
what @arrdem said, note that ^:foo 'a
isn't losing any metadata, ,it's just attaching metadata to the (quote a)
form which is only accessible at compile time
ow wow, that is new to me, i’ve never seen the quoted metadata reader syntax '^:some-key
before
The library coding standards can be made gender neutral.
There are 2 occurrences of he
in https://dev.clojure.org/display/community/Library+Coding+Standards :
One should only extend a protocol to a type if he owns either the type or the protocol.
Replace he
with either they
, one
or she/he
, or similar?
@petterik Alex is offline, but I would imagine that any rework on that article would start by republishing it on http://clojure.org.
I think that's a small enough and reasonable enough change that I went ahead and made it.
It's hard to say whether that page belongs on http://clojure.org ...