On Mon, Mar 23, 2009 at 10:09 AM, Konrad Hinsen <konrad.hin...@laposte.net> wrote: > You seem to envisage exposing some aspects of your data structure as > part of the public API and have others reserved for use by > "authorized" support function. Could you give an example of a > situation where this would be advantageous compared to a support- > function-only approach?
Well, I'm only just beginning to think through the implications of Clojure's approach on OO. But it seems to me that once you make things private by controlling access only with getters and setters, you lose the ability to use all your other libraries that work on standard maps. I guess, loosely speaking, I was envisioning a model in which seq on a hash map would only traverse the "public keys", so that library functions will work on your objects, without exposing innards. But perhaps there is no consistent, sane way to do this, since it's hard to predict what things might actually need that private information (like equality, for example). --~--~---------~--~----~------------~-------~--~----~ 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 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 -~----------~----~----~----~------~----~------~--~---