Related to this, another thing I would like Clojure to provide is an easy way to opt-in for map-like function application for defrecords. Right now, Clojure doesn't implement function application for records, and it is a glaring incompatibility that causes bugs when you switch back and forth between records and maps to explore performance trade-offs. So it should be easy to opt-in.
I assume the reasoning behind it comes from the notion that many people will want to create their own function application behavior for many types of records (which is true). Still, you should at least be able to *choose* to get default function application behavior, because it is tedious and error-prone to implement it on your own. Alternatively, if Clojure did what I suggested in my previous email, and allowed you to override functionality provided by defrecord, then defrecord could safely go ahead and implement function application behavior by default, because people would still be free to override that if they don't want that behavior. The other broader point here is that Clojure fails to provide good default, customizable abstract implementations of all its data structures. There is little to no documentation about what methods need to be overridden to get a minimal implementation of a given data structure. Clojurescript appears to be doing better on this front, since it was designed from the ground up with protocols in mind, but the lack of correspondence between Clojure's classes/abstract classes/interfaces and Clojurescript's implementation makes it difficult to write cross-platform data structures. -- 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.