On Fri, Mar 11, 2011 at 3:54 AM, Tassilo Horn <tass...@member.fsf.org> wrote:
> Ken Wesson <kwess...@gmail.com> writes:
>
> Hi Ken & Alan,
>
>> Adding metadata to an object produces a new object, rather than
>> altering the existing object.  Every time you increment the counter
>> for a function in p it becomes different, and the memoize treats it as
>> new.
>
> Then I've misread that statement on the homepage:
>
>  An important thing to understand about metadata is that it is not
>  considered to be part of the value of an object. As such, metadata
>  does not impact equality (or hash codes). Two objects that differ only
>  in metadata are equal

Actually, that statement is itself a bit misleading and should be
clarified. Collections and other things with value-equality semantics
are equal if they only differ on metadata, but things like functions
that use object identity in the heap as their equality test are not.

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