Looking at the persistent types  in clojure.lang.* (PersistentVector.java 
et al.) I see several occurrences of the idiom EMPTY.withMeta(meta()) where 
EMPTY is a constant (static final) denoting an empty collection of the 
appropriate type.

What I can not understand, given that these types are all persistent, is 
why the EMPTY constant is, in effect, copied at most places where it is 
used. Why not use the same EMPTY instance instead, i.e. 
replace EMPTY.withMeta(meta()) with just EMPTY. Unless I miss something 
this could not hurt and would save some time and space.

Regards,

-- 
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

Reply via email to