lua-users home
lua-l archive

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



if the class table has a shared metatable, you could add a __classname member to it, or even to the table itself.

what I'd like to see is upvalues (or ability to associate data) with the light userdata type.

at the moment it can only store a pointer. It would be great if it could store just one more bit of information which could be used to look up type information in the host environment.

Adrien


Stephen Kellett wrote:
Patrick Donnelly wrote:
I'm curious what features people would like to see added to Lua.

This comment is from the perspective of a software tool developer. In that context I am talking about inspecting Lua internals and Lua objects from C.

I'd like to see the ability to actually get a class name for a class object. Currently when you query an object for its type (from C) you just get "Table", which is not very useful. Its much more useful to know that a "Weeble" object is possibly leaking (look there are 10,000 of the critters!) rather than noticing the Table count has increased by 10,000.

I was talking with Bob Pappas from Adobe(*) yesterday (we were talking about the Lua Memory Validator product I am involved with) and this issue came up - he had lots of Table objects but we couldn't tell which class/type each object was. It limits the info you can get from a tool like Lua Memory Validator (or any tools like it, not that I am aware of any others for Lua).

Cheers

Stephen
(*) Sorry the name dropping but I've mentioned this because it did happen and it shows that big names are using Lua and interested in issues such as this.

--
Adrien de Croy - WinGate Proxy Server - http://www.wingate.com