Hello,  I'm playing a bit with the 'Component' library. The system has some 
initial configuration (port numbers, uri's, usernames,...) in code.

I'm doubting to eighter pass configuration when constructing the system: 
(C/system-map 
 :mycomponent  (map->MyComponent {:conf ...}) 

OR to pass configuration itself as a component
(defrecord Config ...)
(C/system-map 
:config ...
:mycomponent
   (C/using (map->MyComponent ...) [:config])

Is there any reason why to prefer one way over the  other or is it just 
personal preference?

kind regards,
Dieter


-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/clojure/2abcf943-e885-4e17-9856-0247959115dcn%40googlegroups.com.

Reply via email to