A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2010-December/106450.html below:

[Python-Dev] gc ideas -- sparse memory

[Python-Dev] gc ideas -- sparse memory [Python-Dev] gc ideas -- sparse memoryStephen J. Turnbull stephen at xemacs.org
Sun Dec 5 09:17:37 CET 2010
"Martin v. Löwis" writes:
 > > Why is useful to expose an identity hash?  AFAICS it is *only* useful
 > > in building an identity hash table.  If so, why not just provide id()
 > > or the is operator or both and be done with it?
 > 
 > That's precisely James' point: Java provides the identity hash
 > *instead* of the id() function (i.e. it does not have an equivalent
 > of id()). Doing so gives greater liberties in implementing Java.

Yes, we understand that it makes the implementer's job easier.  *Why
bother having an identity hash at all?*  Having taken away id() and
provided maximum leisure to the implementer via

def identity_hash(object):
    return 42

is there *any* benefit left for the user/developer?  All I see is
costs: costs in implementation, costs in debugging.  And AFAICS this
is a problem that can be solved once and reused by everybody who needs
id(); why does every developer need to write his own id() function?

More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4