lua-users home
lua-l archive

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


Jim:
> do you intend this to be possible only from C code or from the Lua
side aswell ?

as i dont use the c api, i mean there both :D


> optional metatable entry representing a function with an optional
integer argument with default value 1 ?

uhmmm i knew it wont be clear, sorry! :D

so my thought was that it should be handled internally anyway, so just
a number can be enough, but if someone is messing with the
initialization, then they can write there any number, not just 1 if it
already had other references, that way the engine will count forward
from that number, so its only about helping the engine in the
initialization, as it doesnt have to count references that already
exists, but this can lead to errors if the engine wont clean up on
garbage collection if there are no more refs remaining... so a
setter/getter is probably better with self initialization instead of
manual messing, but the basic idea is here for thinking about it...

and thx for the support! :D even if the next lua already became an
alpha, and there is no much chance to change anything, but when
anything becomes available, then its hard to undo/change it later, so
i think that my new proposal is still in the right time, just its
inconvenient, as the new stuffs were already worked out and nearly
settled...



Coda Highland:
> Might, actually. It adds overhead to every assignment. With <toclose> or whatever we end up calling it you gain the ability to implement it yourself in the contexts where it matters without slowing down the Lua core.

that sounds legit, but i think its like a matter of a checking a flag
if there is nothing to do, and i believe that the presence of
<toclose> should be checked like so, but my mental model about the
internals arent really clean so far now... (but sooner or later i will
try to dedicate some time to read more of the sources :D )


best! :)