[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: garbage collection thoughts... again?!
- From: Thatcher Ulrich <tu@...>
- Date: Thu, 29 May 2003 13:23:40 -0400 (EDT)
On Thu, 29 May 2003, Peter Hill wrote:
>
> One thing I think is worth specifying is the goals.
>
> For example: should the GC be completely transparent to the coder (a nice
> ideal), or is the coder required to know the process (eg: with reference
> counting the programmer can act to minimise circular references).
>
> Despite the recent non-shrinking-table oddity (the programmer having to be
> aware of implementation so that they can poke a dummy value into a table to
> free up its excess memory) I get the *impression* that Lua is designed to be
> quite high level and as independent of internal implementation methods as
> possible. If this is so then it weakens the desirabiliy of reference counts
> for Lua.
Yes, I think this is probably the best argument against ref-counting
for Lua. One of the big advantages of ref-counting is the
predictability, which means programmers may tend to rely on its
behavior, making it impossible to change the GC implementation without
breaking programs. Likewise ref-counting does sometimes require some
explicit management, which further ties programs to the
implementation.
-Thatcher