Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Proposal for Ephemerons in Scheme (mumble.net)
9 points by fogus on Feb 16, 2010 | hide | past | favorite | 4 comments


Can someone explain the differences between this and weak references in a VM with garbage collection?


To be pedantic, scheme is garbage collected, and several use a VM.

PLT already has weak references, and the author assumes the Scheme implementation already has them.

As far as I can tell, this is somewhat like a weakHashMap, except each ephemeron only handles one key value pair.



Thanks! That link says it pretty clear: In particular, an ephemeron can be combined with a weak hash table (see Hash Tables) to produce a mapping where the memory manager can reclaim key–value pairs even when the value refers to the key.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: