[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

#1819: Add user-facing weak pairs API

From: Chicken Trac
Subject: #1819: Add user-facing weak pairs API
Date: Fri, 26 May 2023 07:14:27 -0000

#1819: Add user-facing weak pairs API
            Reporter:  sjamaan       |       Type:  defect
              Status:  new           |   Priority:  major
           Milestone:  someday       |  Component:  core libraries
             Version:  5.3.0         |   Keywords:  weak pairs, ephemerons,
Estimated difficulty:  medium        |  line numbers
 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:

 Also in Chez Scheme:

 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, but from
 -brief-preamble it seems these are somewhat trickier to implement, so that
 might be for a later version.

Ticket URL: <>
CHICKEN Scheme <>
CHICKEN Scheme is a compiler for the Scheme programming language.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]