Well, as far as I understand, protocols was made as they were on purpose, so inability to create hierarchies is a "feature" (like it or not), while the lack of `get-method`-like thing is clearly a defect (in my mind).
Anyway, you have multimethods which can do almost anything, so I think it'd be a good idea to implement proof-of-concept of what you have in mind and publish it on Github, so people could try it and compare to what they already have. вторник, 3 июля 2012 г., 21:13:27 UTC+6 пользователь Warren Lynn написал: > > > > On Tuesday, July 3, 2012 4:18:44 AM UTC-4, Vinzent wrote: >> >> I believe the protocol's analogue for get-method would be enough. >> >> >> > If here you mean we just need to use get-method to directly reuse a > protocol method anywhere, I think that is not adequate. We need to maintain > the hierarchy structure so even at run time we can re-define parent > protocol methods and things will still work as expected for the derived > type. Although, I also feel the free-style re-use of any method from > anywhere (instead of always bundle all methods in one protocol together and > following a hierarchy) may create some chaotic code structure that is > difficult to understand, maintain and communicate with other developers. > > But get-method can be a building block here of course, and may be handy > for those cases you do need ad-hoc re-use of some code. > -- 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