Structural correctness while refactoring in Clojure -


if project using "person" maps shape {:firstname :lastname :address}, , want change shape {:name {:firstname :lastname} :address}, can ensure i've made corresponding changes everywhere these objects used?

in java, it's straightforward anywhere still have person.firstname issue compile error. in clojure might not runtime error, bad data saved server. assume it's not possible guarantee correctness, there other fine-toothed-combs?

clojure has libraries provide data definition , validation. example, use https://github.com/prismatic/schema

regarding difficulty of compile-time vs. runtime errors...well, issue not unique clojure. quote john carmack: "the challenge of lisp getting program run, challenge of haskell getting compile."


Comments

Popular posts from this blog

Java 3D LWJGL collision -

spring - SubProtocolWebSocketHandler - No handlers -

methods - python can't use function in submodule -