Closed GoogleCodeExporter closed 8 years ago
Also, would like hash to be provided. Their hash can just be: hash (get_pointer
(ref f)).
Original comment by dubious...@gmail.com
on 21 Jun 2012 at 8:30
This issue was closed by revision d2a3ed9f36f2.
Original comment by aggraef@gmail.com
on 23 Jun 2012 at 10:33
The assertion should be fixed. But I'm not sure if I understand your comment
#1, can you elaborate? Note that the hash value of a closure is based on its
key which uniquely identifies the underlying function. It's not based on the
pointer to the closure object, if that's what you mean.
Original comment by aggraef@gmail.com
on 23 Jun 2012 at 10:41
Original comment by aggraef@gmail.com
on 23 Jun 2012 at 10:42
It was just a suggestion about how the hash value could be derived. I
understand your comment to mean that closures with the same underlying function
but different environments nonetheless hash the same. (I presume they won't be
===.)
Original comment by dubious...@gmail.com
on 24 Jun 2012 at 1:49
Ah yes, I see. It certainly makes sense to include the environment in the hash.
(And yes, === works ok, it does compare the environments.)
Original comment by aggraef@gmail.com
on 24 Jun 2012 at 10:37
This issue was closed by revision dce8bce7e7ea.
Original comment by aggraef@gmail.com
on 24 Jun 2012 at 11:07
Original issue reported on code.google.com by
dubious...@gmail.com
on 21 Jun 2012 at 8:27