Olivier Dion <[email protected]> writes: > On Sun, 24 May 2026, Tomas Volf <[email protected]> wrote: > [...] >> This was quite interesting read. The problem of generating identifiers >> describe above seems non-trivial. I probably do not have anything novel >> to add to the debate, but two questions popped up in my head. >> >> 1. What do other Schemes do? >> 2. Would incorporating source location (if available) into the hash be >> valid? > > I've tried to hash the syntax instead of the datum in psyntax. Looking > at the C code for hashing, hashing syntax seems to also include some > metadata information. But it did not yield a fix.
I am surprised to hear this. Since even the warning message correctly points both lines, the source location was obviously recorded. So I do not understand why it did not help with the hashing. > I think what we probably want is a strong collision resistant hash. A > strong crypto hash would do the job for this. So the current core hash > would not be impacted. > > > I had some discussions related to this, i.e. crypto hash, in core guile, > with Ludovic and Rob. I think that having core support for some > the crypto hashing makes sense, especially if the compiler needs it. > > Thoughts? I agree with other posters, that using crypto hash as default for generic hashing might not be ideal, but I am far from expert in the area. One extra thought though. While I do understand why (hash) must have bounded time (albeit whether the current maximal depth is sufficient is a separate question), does the same hold even for generating identifiers? Maybe it does, I am not sure. Tomas -- There are only two hard things in Computer Science: cache invalidation, naming things and off-by-one errors.
