Fork me on GitHub
#announcements
<
2019-07-26
>
vemv11:07:13

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

vemv11:07:13

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

jivagoalves12:07:00

@ 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? 🙂

vemv12:07:15

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.

jivagoalves12:07:07

Got it. Thanks for clarifying!

vemv12:07:20

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.

eggsyntax13:07:56

@ that is a really elegant way to incorporate inline specs. Bravo! 👏

darioszr15:07:52

clojure iapetos prometheus client. a project of clj-commons, merged on upstream doc of prometheus 🚀 https://github.com/prometheus/docs/pull/1405