[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Strings in weak tables
- From: Mark Hamburg <mhamburg@...>
- Date: Tue, 28 Aug 2007 12:04:36 -0700
While I understand the reasoning for making strings act like values with
respect to weak tables, it can be a problem when dealing with computed
strings. For example, I might want to cache SQL statements and their
compiled form for SQLite.
1. Is it sufficient to change iscleared in lg.c to not treat strings
specially to change the behavior?
2. Should Lua perhaps add the option of including an "s" in the mode field
to indicate that strings are weak? One issue I could see here is that it
probably then pushes for marking strings at a different point in the
processing in working with weak tables if the weakness of strings can vary
from table to table.