diff options
-rw-r--r-- | weak-refs.org | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/weak-refs.org b/weak-refs.org index fb97694..98cf5a7 100644 --- a/weak-refs.org +++ b/weak-refs.org @@ -13,6 +13,23 @@ June 3rd, 2023 +* Why weak references? + +** User "kluk" on IRC mentioned not having line numbers in the interpreter +** was a nonstarter. + +** Discussion followed. Why don't we have it? + +*** Interpreter can read/eval an unbounded number of expressions +*** So, line number database would keep growing +*** Not great for memory usage - programs would get slower/crash over time + +** How could this be fixed? + +*** Have the line number db use weak pairs, with the input form collectable + +** We already "kind of" have weak pairs, but not user-visible + * Quick refresher on data types All data is represented by a machine word: |