clojure-dev

Issues: https://clojure.atlassian.net/browse/CLJ | Guide: https://insideclojure.org/2015/05/01/contributing-clojure/
2019-12-05T08:19:30.363600Z

Morning

2019-12-05T08:20:18.364400Z

Is it expected that satisfies? returns false for vals extending the protocol with metadata?

2019-12-05T08:21:15.365500Z

Case in point:

(defprotocol A :extend-via-metadata true (a [this]))
(satisfies? A (with-meta {} {`a identity})) ;; => false

2019-12-05T08:21:28.365800Z

but as expected:

2019-12-05T08:21:48.366200Z

(a (with-meta {} {`a identity})) ;; => {}

orestis 2019-12-05T08:26:47.366800Z

Shouldn’t the protocol opt-in to extension via metadata?

2019-12-05T08:27:06.367200Z

@orestis you're right, my example misses that, fixed

2019-12-05T08:28:33.368Z

seem to cover it

2019-12-05T08:28:40.368300Z

so it's considered as a fix

mpenet 2019-12-05T10:09:52.368500Z

satisfies? is also quite slow

mpenet 2019-12-05T10:10:02.368800Z

(for now)

alexmiller 2019-12-05T14:03:24.369200Z

there's a separate ticket for that

alexmiller 2019-12-05T14:06:24.369700Z

https://clojure.atlassian.net/browse/CLJ-1814

alexmiller 2019-12-05T14:06:42.370100Z

on the downside, fixing CLJ-2426 will only hurt perf more

mpenet 2019-12-06T08:34:09.378500Z

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).

2019-12-05T17:26:15.371700Z

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

bronsa 2019-12-05T17:27:42.372100Z

#^ is a deprecated synonym of ^

2019-12-05T17:28:57.372700Z

so this is “official” ? because I couldnt find anything stating it 😕

bronsa 2019-12-05T17:29:08.373100Z

a long time ago ^ used to mean read-time meta and #^ was the way to do read time with-meta

bronsa 2019-12-05T17:30:04.373200Z

^ is the "preferred" way to do it now, but #^ is never going away or change

bronsa 2019-12-05T17:30:26.373700Z

it's deprecated in the sense that ^ is equivalent and preferred to it

dominicm 2019-12-05T17:30:31.374Z

There's some uses in the clojure source code still

2019-12-05T17:31:02.374300Z

:thumbsup::skin-tone-4:

2019-12-05T17:31:08.374500Z

thanks a lot for the info

dominicm 2019-12-05T17:33:50.374900Z

(says the same thing as @bronsa )

2019-12-05T17:42:43.375400Z

@bronsa are there any cases where #^ supports more than ^?

2019-12-05T17:42:47.375600Z

at one point I thought there was something

2019-12-05T17:43:04.375900Z

like in the odder cases where you hint a string :tag or something?

bronsa 2019-12-05T17:45:42.376Z

no they're literally the same

bronsa 2019-12-05T17:46:21.376700Z

you're thinking of something else

alexmiller 2019-12-05T18:05:04.377500Z

^^ they both just invoke the MetaReader

2019-12-05T18:33:44.378400Z

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.