defmodel macro generates a record type using Potemkindefrecord+ instead of vanilla Clojure defrecord. This behaves identically to normal defrecord for all intents and purposes, but unlike vanilla defrecord, reevaluating the form will not replace the original class if the form itself has not changed. This makes working with Toucan models during interactive development an order of magnitude easier: previously, reloading a namespace containing a Toucan model would require you to reload any other namespaces that used that class, e.g. for interface/protocol/multimethod dispatch.
defmodel
macro generates a record type using Potemkindefrecord+
instead of vanilla Clojuredefrecord
. This behaves identically to normaldefrecord
for all intents and purposes, but unlike vanilladefrecord
, reevaluating the form will not replace the original class if the form itself has not changed. This makes working with Toucan models during interactive development an order of magnitude easier: previously, reloading a namespace containing a Toucan model would require you to reload any other namespaces that used that class, e.g. for interface/protocol/multimethod dispatch.