can ephemerons be implemented on JVM? on .Net? Per Bothner (15 Jul 2016 16:07 UTC)
Re: can ephemerons be implemented on JVM? on .Net? John Cowan (15 Jul 2016 16:48 UTC)

can ephemerons be implemented on JVM? on .Net? Per Bothner 15 Jul 2016 16:07 UTC

Is there any way to implement ephemerons portably on the Java VM?
I'm open to using native methods - but not to re-writing the GC!
Are there public hooks in HotSpot that can be used?
The JVM has week pointers, but that appears not to be enough.

What about .Net?  I'm less familiar with that platform, but
I'm curious if it can support ephemerons.

More generally, what if you have weak pointers, but otherwise limited or
no access to GC internals?

I know SRFI-124 says "The implementation in ephemerons-trivial.scm does
not have any hooks to the GC, but it is still a correct implementation".
However, that is not "supporting ephemerons".  It's like an implementation
(Chibi ?) "supporting" string-set! - but at the cost of a full GC on
every call.

If the answer to these questions are negative, I don't understand how one could
seriously consider having SRFI-124 be part of WG2 Scheme.
--
	--Per Bothner
xxxxxx@bothner.com   http://per.bothner.com/