lua-users home
lua-l archive

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


What's probably needed here is a __type metatable entry and a rawtype
function which ignores it. Any individual user could certainly add it and
replace the existing definition of type such that it obeys it, but agreed
standards would be good here.

(Or if one doesn't want to replace the existing routine, we need
extendedtype and type.)

Mark

on 8/17/07 2:24 AM, Stephen Kellett at lua@objmedia.demon.co.uk 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.