You're right that my use isn't strictly returning a collection with a size of zero-- I'm treating empty more like 'default'. I'm thinking of its use in clojure.walk, which simply creates a "blank" version of an arbitrary collection in which to place the altered sub-forms. I can't find any other usages of 'empty' in the std lib.
I agree it's a bit of a mismatch, as 'walk' won't be able to alter the built-in keys of a record, but you wouldn't expect that to happen if you were using records. Should IPersistentCollection even be defining 'empty', if one of the language's key data types doesn't support it? I think it would be better to either pull 'empty' into it's own protocol so clojure.walk doesn't match on IPersistentCollection when walking a data structure with the false expectation that it can create an empty version, or rename 'empty' it to something that records can implement, like 'default.' -- 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