This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-12-05
Channels
- # adventofcode (95)
- # announcements (3)
- # babashka (11)
- # beginners (39)
- # boot (19)
- # bristol-clojurians (1)
- # cider (32)
- # clj-kondo (39)
- # cljsrn (8)
- # clojure (156)
- # clojure-dev (35)
- # clojure-europe (4)
- # clojure-italy (15)
- # clojure-nl (28)
- # clojure-spec (43)
- # clojure-uk (153)
- # clojurescript (168)
- # core-async (13)
- # core-logic (11)
- # cryogen (4)
- # cursive (13)
- # datomic (26)
- # duct (3)
- # emacs (8)
- # fulcro (33)
- # garden (4)
- # graalvm (18)
- # graphql (4)
- # jobs-discuss (2)
- # kaocha (1)
- # leiningen (3)
- # malli (8)
- # off-topic (1)
- # pathom (7)
- # re-frame (21)
- # reagent (3)
- # rewrite-clj (1)
- # schema (4)
- # shadow-cljs (40)
- # sql (2)
- # uncomplicate (3)
Is it expected that satisfies?
returns false for vals extending the protocol with metadata?
Case in point:
(defprotocol A :extend-via-metadata true (a [this]))
(satisfies? A (with-meta {} {`a identity})) ;; => false
Ah: https://clojure.atlassian.net/browse/CLJ-2426 and https://ask.clojure.org/index.php/4622/satisfies-doesnt-work-instance-based-protocol-polymorphism?show=4622#q4622
there's a separate ticket for that
on the downside, fixing CLJ-2426 will only hurt perf more
did you consider leaving the behavior of satisfies?
as is and have a separate predicate for extended vals, like val-satisfies?
which would be the slow, all encompassing version (checks any val, record included).
quick question: is the syntax #^
for meta data deprecated ? I only found this commit for v1.2
to allow ^
for metadata but unfortunately the changes.md
file goes up until v1.3
😅
https://github.com/clojure/clojure/commit/a5ca8243e3ea45e6387b2b00d0e9b2624d16adbf
a long time ago ^
used to mean read-time meta
and #^
was the way to do read time with-meta
https://github.com/clojure/clojure-site/blob/7493bdb10222719923519bfd6d2699a26677ee82/content/guides/weird_characters.adoc#L309 somewhat documented here
https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/LispReader.java#L94 https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/LispReader.java#L109
^^ they both just invoke the MetaReader
I think some developers may have become accustomed to the idea that "deprecated" means "will likely go away in a future version" ? That does not seem to apply to Clojure, and not very often to Java.