|
On 22/04/2014 4:44 PM, steve donovan wrote:
Man, it took me a while in the beginning to understand the difference between light and full, but it's easy enough: light is just a pointer, and all light userdata share the same metatable (like strings, etc); full metadata can have individual metatables. Now imagine writing the manual to explain the meaning of 'shallow' ;)
[snip]
But conceptually, three is a much larger number than two...
Conceptually, there are still two types of userdata: light and full. The proposal extends the concept of light userdata by allowing multiple distinct classes (tagged subtypes) of light userdata.
C language embedders may introduce additional classes of light userdata (class-0, class-1, class-2, etc.). Each class has a distinct metatable, but otherwise behaves as light userdata does currently. Existing code gets class-0 light userdata, and so works exactly as it does now.
But still, conceptually, two is a much larger number than one. Ross.