Fork me on GitHub

what is the use case or rationale for s/map-of not conforming the keys by default?

  (s/map-of (s/or :s string? :b boolean?) 
            (s/or :s string? :b boolean?)) 
  {"k" "v"})
; => {"1" [:s "1"]}

  (s/map-of (s/or :s string? :b boolean?) 
            (s/or :s string? :b boolean?) 
            :conform-keys true) 
  {"k" "v"})
; => {[:s "k"] [:s "v"]}

Alex Miller (Clojure team)14:01:21

Usually keys are things that are not changed by conforming (keywords, strings, longs, symbols) and there is cost to conforming things, so defaults to not doing it.


ok, thanks.