You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This would utilize requiring-resolve (backported from 1.10 OR not available if not present). This would make it easier to support things like extending a protocol via metadata:
I believe I have been using something similar in the past where configuration values could be functions (or indeed protocols), with the following reader:
However these days I tend to go for a small keyword->config map whenever possible:
(def ^:private m {:conf-value-a my.ns/func-a
:conf-value-b my.ns/func-b
:conf-value-c my.ns/func-c})
(defn- get-conf [kw]
;; could throw here if there is no suitable value
(get m kw))
A bit more verbose perhaps, but it works with other things like Java enums.
This would utilize
requiring-resolve
(backported from 1.10 OR not available if not present). This would make it easier to support things like extending a protocol via metadata:This would be assistive to projects like clip and edge which allow defining the system in Aero.
The text was updated successfully, but these errors were encountered: