IDK if it has always been this case, but this doesn't compile in Clojure 1.9
(defprotocol Cleanable (clean [this]))
(defrecord Cleaner [] Cleanable (clean [this] "cleaned!"))
This is likely because java.util.Map implements a clean method with the
same amount of args (0) and defrecord somehow al
The same question was asked on
https://clojurians-log.clojureverse.org/clojure-spec/2018-01-19
but I did not find an answer.
An example, where defrecord works fine but deftype fails:
(do
(require '[clojure.spec.alpha :as s])
(defprotocol Foo (foo [this]))
(defrecord Bar [bar] Foo (foo [this
Spec doesn't check object fields. The defrecord case works because
defrecord implements map.
On Wednesday, July 4, 2018 at 12:47:26 PM UTC+2, markus...@gmail.com wrote:
>
> The same question was asked on
> https://clojurians-log.clojureverse.org/clojure-spec/2018-01-19
> but I did not find an ans
On Tuesday, July 3, 2018 at 4:46:05 PM UTC+1, Austin Haas wrote:
>
> Thanks for the replies.
>
> I only want a stable REPL, integrated with Emacs, and nothing else.
>
> Łukasz, why did you switch to Monroe? What do you prefer about it?
If I'm not mistaken inf-clojure works best if you use the s
So is it best practice to implement map in the deftype to make it
spec-able? Are there examples somewhere that show how to do this in a
canonical way?
On Wednesday, July 4, 2018 at 12:51:29 PM UTC+2, Leon Grapenthin wrote:
>
> Spec doesn't check object fields. The defrecord case works because
>
So is it best practice to implement map in the deftype to make it
spec-able? Are there examples somewhere that show how to do this in a
canonical way?
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googl
I happened to notice this morning that the patch for CLJ-2367 was merged and
Clojure 1.10.0-alpha6 has quietly gone up to Maven Central so we’re running a
full pass of our tests at work on the new ASM/Java 8+ stuff.
The 1.10.0-master-SNAPSHOT is currently lagging behind (June 27) and does not
y
So is it best practice to implement map in the deftype to make it spec-able?
Are there examples somewhere that show how to do this in a canonical way?
If you want a `deftype` that is spec-able as a map, why not just use
`defrecord`? Manually implementing the various map-related interfaces is a f
The snapshots run nightly.
> On Jul 4, 2018, at 1:23 PM, Sean Corfield wrote:
>
> I happened to notice this morning that the patch for CLJ-2367 was merged and
> Clojure 1.10.0-alpha6 has quietly gone up to Maven Central so we’re running a
> full pass of our tests at work on the new ASM/Java 8+
And they also run on commit if we don’t force a release before that happens.
> On Jul 4, 2018, at 2:15 PM, Alex Miller wrote:
>
> The snapshots run nightly.
>
>> On Jul 4, 2018, at 1:23 PM, Sean Corfield wrote:
>>
>> I happened to notice this morning that the patch for CLJ-2367 was merged and
Seems like it's already reported on JIRA a couple of years ago:
https://dev.clojure.org/jira/browse/CLJ-1791
On Wednesday, July 4, 2018 at 6:58:13 PM UTC+9, Leon Grapenthin wrote:
>
> IDK if it has always been this case, but this doesn't compile in Clojure
> 1.9
>
> (defprotocol Cleanable (clean
11 matches
Mail list logo