Re: SRFI 254, as written, is incompatible with generational gc
Marc Nieper-Wißkirchen 04 Dec 2026 18:44 UTC
Will, I’m happy to continue discussing the technical questions and any
suggestions for making the SRFI clearer, and I ask that we do so
without sarcasm or condescension.
-- Marc
Am Fr., 4. Dez. 2026 um 19:29 Uhr schrieb Will Clinger <xxxxxx@fastmail.com>:
>
> On Fri, Dec 4, 2026, at 6:27 AM, Marc Nieper-Wißkirchen wrote:
> > The SRFI 254 term "moved" is a semantic notion. It does not mean that
> > the GC has to relocate an object physically. When an object of your
> > vector moves, the vector itself counts as moved even if its address
> > stays the same.
>
> That is an extraordinarily peculiar notion of what it means for
> an object to move. In particular, it would take considerable
> contortion of thought for someone reading SRFI 254 to think
> that is what the word "move", as used within that document,
> is intended to mean. As the author of the semantics you are
> presumably alluding to when you say it is a "semantic notion",
> I am also finding it requires considerable effort on my part to
> understand how anyone would think your allegedly "semantic
> notion" has anything to do with that semantics. After all, the
> locations of the semantics were introduced (in part) to explain
> the semantics of eqv?, and moving an element of a vector
> certainly has no effect upon the vector's location as seen
> by eqv? and friends.
>
> On the other hand, a clarification of the word's meaning is
> helpful if it allows SRFI 254 to be implemented as interpreted
> (I can't bring myself to say "as written" !) by implementations
> that use generational garbage collectors.
>
> It is of course vitally important that programmers who rely on
> SRFI 254 understand that transport cell guardians are quite
> unlikely to report that an object has moved unless that object's
> address has been changed by the garbage collector.
>
> I suppose a client of SRFI 254 could insist that implementations
> of SRFI 254 that comply with the obvious meaning of the words
> written within the document are somehow broken.
>
> But I'm quite happy to hear that all of us can get along with using
> SRFI 254 as written, provided we all choose to rely upon our own
> individual interpretations of its words when deciding whether an
> alleged implementation of SRFI 254 is correct.
>
> Speaking of which, I have implemented SRFI 254 and tested it
> within the current development version of Larceny (so it is not
> yet part of the versions available for download at larcenists.org).
> For most people, I think, the comments I wrote within two of
> its test programs will the most interesting parts of Larceny's
> implementation:
>
> https://github.com/larcenists/larceny/blob/master/lib/SRFI/test/srfi-254tc-test.sps7
> https://github.com/larcenists/larceny/blob/master/lib/SRFI/test/srfi-254-stipulation2.sps7
>
> The second of those is an updated version of the test program
> whose earlier versions I posted to this discussion list; those
> earlier versions made use of SRFI 176, which is not part of the
> v2.0.1 release, but the updated version does not use SRFI 176.
>
> That test program demonstrates that moving an element x of
> a vector v does not move the vector v in the sense of "move"
> that is standard terminology among those of us who have long
> been active within the garbage collection community.
>
> Will Clinger