On Jun 18, 2012, at 2:09 AM, Christophe Grand <christo...@cgrand.net> wrote:
On Sun, Jun 17, 2012 at 8:59 PM, Kurt Harriger <kurtharri...@gmail.com>wrote: > > Data structure is an implementation detail... >> > > It's not. Not in clojure. It is in OO, but clojure is not an OO language, > so it's not an implementation detail in clojure. > > > That is my point, representations SHOULD be considered implementation > details, because representations change... if you treat them as contracts > your code will break everywhere, if you wrap them with abstractions your > code will only need to change in one place... > Representations are values in Clojure, they are not mixed with behaviors like in mainstream OO. It follows that, if your representation need to change, you can write a converter function (or two if you want to convert from and to the old representation), that's easy, easier than writing an adapter class in Java because the adapter class must implement new behaviors on top of old ones (or the other way round). Isnt that just creating an api? Everywhere the old model exists you need to call a function to create the desired data structure and this adds another layer of complexity that needs maintained. Not all conversions are straight forward, may require additional context of whatever introducing the need for deferred computation. Christophe -- 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 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