On Aug 14, 3:22 am, Armando Blancas <armando_blan...@yahoo.com> wrote: > > A more concrete example: say I've defined a protocol for AST nodes in > > 1.0 of a library, and later when developing 2.0 I discover it would > > have been a good idea to have a "pretty-print" method on nodes to show > > human-readable output. If the protocol had Trait-like characteristics > > I could add pretty-print to the protocol, with a default > > implementation that just prints the fields of the node, but override > > that with a better implementation for some of the new record types I'm > > including in 2.0. > > Is this because you've got Java clients coding against your > interfaces? In Clojure I'd like to do something like: > (doseq [node (walk-tree)] (pretty-print node))
No, I'm just trying to work this all out based on my experiences with using Java interfaces in library design. Although I guess Java interop will be important for me since I have a lot of existing Java to support, -- 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