racket / racket/racket

[Feature Request] Weak Vectors

Open
#4,389 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature request
Dominant language
Racket
Stars
5.2k
Forks
698
Avg merge
18h 34m
Merged PRs (30d)
5

Description

Weak vectors are useful for maintaining pools of objects who's finalisers interact with other live objects in the pool. For example, compacting or reordering slots which become free due to the underlying object being unreachable. Or managing pools of objects in an FFI context.

Currently you can create a vector of weak pairs, but this adds an extra level of indirection and memory usage for no benefit.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files, tests, or entry points are named. Begin by locating the existing weak-pair and vector implementations and their tests, then determine the runtime and garbage-collection requirements for weak vectors. Done means a supported weak-vector feature avoids the extra weak-pair indirection and has coverage for the stated object-pool use cases.

Written by the indexing model from the issue text.

Assessment

Domain
backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.