generateme / cljplot

JVM Clojure charting library
Eclipse Public License 2.0
153 stars 7 forks source link

config cleanup #3

Open genmeblog opened 5 years ago

genmeblog commented 5 years ago
  1. atom for global configuration
  2. register-config function
  3. move all configs to implementations and review
  4. multiple inheritance
  5. remove config namespace
joinr commented 5 years ago

cljplot.config/configuration-functions maybe should be tied into the current method table....

(-> cljplot.common/render-graph bean :methodTable keys) Or whatever is tied to configuration. This greatly facilitates runtime spec validation, and extensibility, since you can hook validation into the multimethod implementations directly.

I'm uncertain about the values in configuration-functions, I'm guessing they're supposed to define expected argument arities and types that are coming through the multimethod.