This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-08-29
Channels
- # aleph (5)
- # announcements (2)
- # bangalore-clj (2)
- # beginners (52)
- # cider (10)
- # cljsrn (1)
- # clojure (160)
- # clojure-dev (24)
- # clojure-europe (3)
- # clojure-france (1)
- # clojure-india (1)
- # clojure-italy (3)
- # clojure-nl (6)
- # clojure-spec (13)
- # clojure-uk (51)
- # clojurescript (45)
- # code-reviews (1)
- # core-async (41)
- # cursive (41)
- # datomic (17)
- # emacs (37)
- # fulcro (42)
- # graphql (7)
- # joker (4)
- # music (1)
- # nrepl (2)
- # off-topic (21)
- # pathom (19)
- # pedestal (12)
- # re-frame (48)
- # reitit (6)
- # rewrite-clj (8)
- # shadow-cljs (41)
- # specter (6)
- # sql (21)
- # tools-deps (8)
- # vim (7)
- # xtdb (27)
is it unavoidable to have separate spec/alt
and spec/or
? why can't we use spec/or
as regex op?
there is already a way to escape "regex context" by using spec/spec
, it would be nice to have slimmer api..
They are not the same in a regex context
If you have another regex underneath the alt it can combine with regexes above in ways that or cannot
So yes, they are both needed
they are semantically different
just as s/coll-of and s/* are semantically different
and s/and / s/&
regexes combine to describe the structure of a single collection. non-regexes do not.
specs are intended to express meaning to the reader and these have different meanings
whether you can turn the crank on two things and get the same answer is to some degree beside the point
they are completely different implementations and likely have very different perf characteristics in validation
also need to consider generation, etc