This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-07-26
Channels
- # aleph (9)
- # announcements (10)
- # aws (1)
- # beginners (65)
- # calva (9)
- # cider (11)
- # clj-kondo (1)
- # cljdoc (61)
- # cljsrn (6)
- # clojars (2)
- # clojure (40)
- # clojure-austin (1)
- # clojure-belgium (1)
- # clojure-europe (4)
- # clojure-finland (1)
- # clojure-france (1)
- # clojure-italy (57)
- # clojure-nl (6)
- # clojure-spec (134)
- # clojure-uk (67)
- # clojuredesign-podcast (2)
- # clojurescript (40)
- # cursive (25)
- # datascript (1)
- # datomic (8)
- # events (1)
- # figwheel-main (18)
- # fulcro (36)
- # immutant (5)
- # jobs (5)
- # joker (3)
- # kaocha (41)
- # leiningen (4)
- # luminus (4)
- # off-topic (13)
- # onyx (8)
- # pedestal (2)
- # perun (7)
- # planck (2)
- # protorepl (9)
- # re-frame (3)
- # reagent (73)
- # reitit (5)
- # shadow-cljs (186)
- # sql (4)
- # vim (1)
- # yada (2)
speced.def provides defn
, defprotocol
, fn
macros with identical syntax to that of clojure.core
.
The difference lies in that you can pass clojure.spec
specs, expressed as metadata. That metadata compiles to :pre
/`:post` conditions.
The key benefits are:
- 1:1 mapping to clojure.core's syntax, enabling concision/DRYness, a flat learning curve, and compatibility with every IDE
- specs can be inferred out of type hints, and vice versa
- you can pass metadata at arbitrary levels of destructuring, so you can spec more things
- jvm and clojurescript compatibility
- rich error reporting, even richer than that offered by stock Expound
It's been battled-tested non-stop at Nedap since February, in an increasing number of projects. Hope you find it enjoyable!
https://github.com/nedap/speced.def
@U45T93RA6 Thanks for sharing. I was wondering what does it bring to the table when compared with the following libraries: - https://github.com/jeaye/orchestra - https://github.com/gnl/ghostwheel - https://github.com/Provisdom/defn-spec - https://github.com/danielcompton/defn-spec Would you mind clarifying what's the intended purpose of this one please? 🙂
ty for the interest!
I know those well and the difference is expressed in the key benefits
summarized above.
The alternatives lack at least one of: completeness (defprotocol?), reach (cljs?), efficiency (type inference?), among other stuff expressed in the readme.
Have to say, Ghostwheel has some interesting ideas, but at the same time I feel it bloats defn
with features that really don't belong there, and could as well be placed somewhere else and composed later.
speced.def
is simple: metadata in, a prepost map out.
I see
clojure iapetos prometheus client. a project of clj-commons, merged on upstream doc of prometheus 🚀 https://github.com/prometheus/docs/pull/1405
[ANN] Cognitect Labs' aws-api 0.8.352 https://groups.google.com/forum/#!topic/clojure/-PfzmhtiFrY
InsideClojure Journal 2019.21 - http://ask.clojure.org, tools.deps http://insideclojure.org/2019/07/26/journal/