Fork me on GitHub
#clojure-spec
<
2019-02-12
>
guy13:02:36

If you’re going to be using spec in a project is it better to use spec-2 now instead?

Alex Miller (Clojure team)14:02:29

we have not yet done any releases of spec 2

👍 5
seancorfield17:02:14

(if you're using CLI / deps.edn, you can at least start testing against spec2 to see what code changes you might need to make at some future point @guy)

👍 5
aisamu21:02:29

We usually create aliases (`alias`) and then use ::

misha21:02:32

1) assuming alias :datomic.client.protocol = pro: ::pro/response is fine, but ::pro.response/body just does not work, (as keyword ns is just a string with no "structure" inside, afaik). So you'd need to make an alias for :datomic.client.protocol.response as well. And if you don't have datomic.client.protocol.response and datomic.client.protocol namespaces as files, thats 2 lines for create-ns, and 2 for alias, all just to save 5 words :( 2) afaik, clojurescript does not have alias function (or I did not find it yesterday)

misha21:02:07

yeah, https://github.com/clojure/clojurescript/blob/master/src/main/clojure/cljs/core.cljc#L42

(ns cljs.core
  (:refer-clojure :exclude [ ...
                            #?@(:cljs [alias ...