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)

Re: can ephemerons be implemented on JVM? on .Net? John Cowan 15 Jul 2016 16:48 UTC

Per Bothner scripsit:

> 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 is, in the sense that programs using ephemerons will still
work, they may simply require unboundedly more storage than
before.  That's bad, but better than nothing.  Features such as
real-ephemerons, fake-ephemerons, and weak-reference-ephemerons could be
added to allow programs to detect this situation.

> It's like an implementation (Chibi ?) "supporting" string-set! - but
> at the cost of a full GC on every call.

Actually Chibi has an indirection pointer in the header of string
objects, so that it may need to copy the bytes but never needs to GC.
However, Chicken in UTF-8 mode (which is not the default) does need to
run the GC when a string is mutated such that it needs more bytes.

--
John Cowan          http://www.ccil.org/~cowan        xxxxxx@ccil.org
My corporate data's a mess!
It's all semi-structured, no less.
But I'll be carefree / Using XSLT
On an XML DBMS.