lua-users home
lua-l archive

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

On Tue, May 31, 2016 at 3:16 PM, steve donovan <> wrote:

> I've also come to see it as a flaw, but I understand that it's a hard problem to solve in the context of GC.

I have a different opinion here. In my opinion, anything that is not a "simple type" (i.e., not a number, not a bool, not a string, not a simple userdatum and not a nil), should be ref-counted. When the ref-count reaches zero, it gets collected. The regular GC takes care of everything not collected that way (cycles). The only real argument I have heard against that is "performance" (presumably loss of it), to which I say:

1. Make that a compile-time option. But have it in the common code base. You know, just like we had that done with the generational GC.

2. Measure the true impact on performance in real-world applications.