﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	difficulty
1819	Add user-facing weak pairs API	sjamaan		"User ""kluk"" brought up on IRC that it would be nice to have line number information in the interpreter, for better error reporting.  This is somewhat problematic because the interpreter has to deal with potentially unbounded input, as one can reload files interactively or have code be `eval`ed at will.

Perhaps a relatively simple solution would be to use a weak hash table for the line number database.

Since we already *have* weak pairs in core, perhaps we should simply expose these to the user (and csi).

We could use this API from MIT Scheme:

https://web.mit.edu/scheme_v9.2/doc/mit-scheme-ref/Weak-Pairs.html

Also in Chez Scheme:

https://cisco.github.io/ChezScheme/csug9.5/smgmt.html#./smgmt:h2

Then this could form the basis of a weak hash table API as well. Perhaps best left as an internal API (just like other compiler hash tables are also internal). Later someone(TM) can provide an egg with a proper weak hash table API.

We should probably also look seriously into ephemerons (a la https://srfi.schemers.org/srfi-124/srfi-124.html), but from https://scheme-48.s48.narkive.com/YJq3GJOw/ephemerons-long-message-with-a-brief-preamble it seems these are somewhat trickier to implement, so that might be for a later version."	defect	closed	major	5.4	core libraries	5.3.0	fixed	weak pairs, ephemerons, line numbers		medium
