> The only exception is mutable fields in the type where you don't want uncontrolled access. There you indeed need a protocol to handle the synchronisation of the field access. > > And then you need to include everything accessing the internal state of your data structures in a big deftype with little possibility of reuse.
For example, the earlier hash example cannot be put as an extension. Another related problem is the fact that lambda do not close over the mutable fields within a deftype. (Or at least that is what i understood from several strange error messages.) FP stops at the doors of deftype... -- 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