I've used protocols this way. In fact, this pattern meshes quite well with 
Stuart Sierra's Component lib/pattern. By building system components around 
protocols, subsystems/components can be made swappable. This is rather 
integral to the current design of Datsys actually.

Of course, as other's have pointed out, whether this is worth while is 
totally dependent on whether or not you actually need that kind of 
polymorphism. But if you do, it's a great way to go.

Chris


On Thursday, September 15, 2016 at 1:21:43 PM UTC-7, Cameron Barre wrote:
>
> Has anyone used protocols to create explicit boundaries between the bigger 
> pieces of their systems? We want to track/control the interactions between 
> these sub-systems and are considering using protocols to define public 
> APIs. Is this good practice? Would it be better to simply create our API 
> like a normal library and be explicit about which functions are part of the 
> public API? 
>

-- 
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.
For more options, visit https://groups.google.com/d/optout.

Reply via email to