Closed fasterthanlime closed 9 years ago
If anyone has an idea of the difference between satisfies?
and extends?
, I'm all ears.
In ruby?
@kuon No, silly :) In Clojure.
Compare and contrast:
Maybe satisfies?
is for instances and satisfies?
is for types?
After reading a bit, it seems extends?
is for type and satisfies?
is for object.
Extends:
https://github.com/clojure/clojure/blob/clojure-1.6.0/src/clj/clojure/core_deftype.clj#L517
Satisfies:
https://github.com/clojure/clojure/blob/clojure-1.6.0/src/clj/clojure/core_deftype.clj#L530
Forgot to tag f99be8cdb009d8cb206f5bc5e9f852a5538ca666 in this issue.
Ah, it appears ClojureScript does not have extends?
. Eh.
This issue was too wide, exploded into #101, #102, #103 and closing this one.
Mainly, at the start, for stuff like IAtom, ICollection, ISeqable, etc.
Now in the stdlib they behave as if we had interfaces, but there's no way to check like satisfies? and stuff. That would be extra super useful.
extends?(apparently not in CLJS)deftype
)deftype
)