Fork me on GitHub

  (= (m/form [:=> [:cat :int] :int])
     (m/form {:type :=>
              :input {:type :cat
                      :children [{:type :int}]}
              :output {:type :int}}))
  "malli supports both hiccup & map syntax")

👍 6

Is this unified in the sense that all hiccup gets internally turned into maps and then whatnot or two separate paths? Just trying to think onwards whether this could actually be a cause of sneaky conversion bugs in the long run…


(I haven’t looked into malli internals in ages so judging a single commit diff doesn’t answer that to me)


there is just one path, currently the map-syntax (the new ast) is transformed into properties children and thus, the old code path is used.

👍 2

I’ll most likely reverse that, so the default path is the AST, just a hiccup->ast converter is just mechanical.


why? the ast-path is much faster (with maps), as there is no parsing needed. if real life projects, seen 10x diffrence, 100ms vs 1sec to load all the hundreds of schemas in a slow device.


also, the example was broken, the conversion was nor recursive, fixed inline.