In article <firstname.lastname@example.org.OZ.AU>,
Andrew Bromage <email@example.com.OZ.AU> wrote:
>firstname.lastname@example.org (Patrick Doyle) writes:
>> Can you give an example of two immutable objects, alike in every way,
>>which need to be distinguished?
>They may need to be distinguished for the purpose of compile-time
>garbage collection. If you create two immutable identical objects,
>it may be easier to discover when they become garbage because the
>references to them are unique, than if they were one object with
>a shared reference.
>Admittedly the programmer does not necessarily need to see this.
Neither does the GC. It can simply throw away one of the objects
immediately and use the other, can't it?