lua-users home
lua-l archive

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

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.

Two questions:

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.