James, when I used the term mixin I was referring to a map that acts like a trait that gets merged into a larger map. You would define several such smaller maps that can then be used in various combinations to compose "objects". The identity of the composite object (this) is the map which holds the merged contents of the smaller maps. I.E. The entries in the smaller maps get copied into the larger map.
When executing functions held by a map, the last parameter is always the map itself, i.e. the "this". On the other hand, when placing closures into the map, the self reference is no longer needed as it is implicit in the closure. But this means that a closure can only reference the contents of the map when the closure was created, while a function can reference any of the contents of the map passed as its last argument. Why did I make the map reference the last argument for functions held by the map? So that we can do type polymorphism on the first argument passed to the function. But we should make an exception to this. To facilitate threading, functions which return an updated map should take that map as the first argument. But that is an API change and needs to wait for release 0.6.0. -- 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 unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.