Elisp has a really flexible weak references model. Its hash tables can have weak keys, or weak values, or both! https://nullprogram.com/blog/2012/12/17/