James Bielman wrote:
I wonder if MEM-AREF might be better given a more generic name and documented as the default accessor for foreign pointers.
I think mem-AREF is fine, since (apropos "AREF") will find it, and it nicely fits array access. Yet I also thought MEM-REF's offset-as-bytes needs better visibility (presence in the user's mind & documentation). That's precisely why I submitted one patch to the documentation on 2005-12-23. Let's hope it will be enough and this issue will not become a FAQ or a FMB (frequently made bug).
I think it's perfectly fine for MEM-REF to count in bytes. Such a low-level operator is needed.
I don't think user code will need to use the more primitive features of MEM-REF directly very often...
What about dereferencing a pointer (not as a slot in a struct)? mem-ref is the only candidate for that.
BTW, thanks to Yaroslav for checking whether the documentation works. Every project needs such contributions.
Regards, Jorg Hohle.