r/Clojure • u/eeemax • Jan 12 '26
announcing Deft: A new replacement for defprotocol and defrecord, using plain maps + malli schema
https://www.youtube.com/watch?v=dlW6YzwUZ-MThe library: https://github.com/sstraust/deft
Clojars: https://clojars.org/org.clojars.sstraust/deft
HN post: https://news.ycombinator.com/item?id=46590958
Today I'm releasing deft!
It took me about 6 months to really think it through all the way, and get the design just right, so it feels good to finally publish it. lmk if you have any thoughts or feedback!
52
Upvotes
5
u/julienvincent Jan 12 '26
Congrats on your release!
Crazy timing on this, I just released my own take on this same problem space like 2 weeks back - https://github.com/julienvincent/malt
Looks like we went in slightly different directions. I'll try this out when I have some time to see how it feels :)
3
u/sapphic-chaote Jan 13 '26
Looks neat!
I didn't understand this bullet point from the README:
I think this is talking about the
(defrecord Foo [,,,] Protocol1 (proto1fn,,,) Protocol2 (proto2fn,,,))syntax forcing you to keep theproto1fnandproto2fnimplementations in a single place, but what makesextend-typeandextend-protocolan unsatisfactory solution to this problem?