how doesn't it work? the approach of writing your library using regular functions while protocols provide a simple pluggable lower bound that users can implement. and when users do implement the simple protocols they suddenly get all the advanced features of the library functions, like if you implement ISeq, suddenly all of clojure's sequence functions work on your data.
On Fri, Aug 13, 2010 at 9:40 PM, Matthew Phillips <[email protected]> wrote: > On Aug 14, 9:07 am, Kevin Downey <[email protected]> wrote: >> so clients don't directly call the protocol functions they call >> print-ast which then checks to see if PrettyPrintable has been >> extended to the object and falls back to the default if it hasn't > > Sure, but I'm talking about publishing protocols that clients > implement, not an API that might make use of protocols internally. If > the clients implement *and* call methods via protocols, then that kind > of approach doesn't really work. > > -- > You received this message because you are subscribed to the Google > Groups "Clojure" group. > To post to this group, send email to [email protected] > Note that posts from new members are moderated - please be patient with your > first post. > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/clojure?hl=en -- And what is good, Phaedrus, And what is not good— Need we ask anyone to tell us these things? -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to [email protected] Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/clojure?hl=en
