[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [PATCH] make light userdata a little bit heavier
- From: Dirk Laurie <dirk.laurie@...>
- Date: Mon, 21 Apr 2014 16:43:17 +0200
Eike: > Personally, I don't know what light userdata types are good for anymore.
Ross: > The problem for me with light userdata is that they are typeless
Light userdata is designed for one situation only: interfacing with C
packages someone else has written that do their own memory management.
That should, in the case of a properly
written package, include some kind of type management. All you can do
with them in Lua is to assign names to them and pass them to C
functions.
Peng Zhicheng's suggestion is for something intermediate between light
userdata (typeless)
and full userdata (individually typed), and the motivation is that one
can save some overhead
that way. I think it is a useful idea, but not useful enough to
justify working with a patched Lua.