lua-users home
lua-l archive

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




On Fri, Jun 27, 2008 at 2:33 PM, James Kimble <jkimble@one.net> wrote:
Not trying to start any kind of fire fight AT ALL. Just wanting to compare
technologies. One I'm familiar with, the other completely new to.

I'd like to provide a view from that of a software tool maker. This view is based on our experience providing tools to users of Lua and the feedback from those users.

I prefer Lua to JS for most things, but one thing JS (and Ruby and Python, etc) does better is that in JS you can ask an object what its type is and get a human readable string that makes sense ("String", "Weeble", "Mouse", NASDAQPrice", etc).

In Lua you can only get a meaningful type name *IF* someone has thought to setup the appropriate data. If they haven't set that up, you get nothing.

For most things this is not important, but its very important if you are writing a debugging/profiling tool. Its important because:
a) We want the users of our tool to be able to have this information
b) The users of our tools want this information and *don't understand why it isn't available* from the tool, even though they are intimately familiar with the language.

Case in point: I asked about this many months ago after getting a request from the Abode Lightroom team for the type information. I said we didn't know how to do it. So we asked on this mailing list. We got some helpful responses (thank you, guys). But even after implementing the suggested methods for getting the type information on 40% of the various objects displayed in the memory allocation browser had meaningful types, the rest had type names that we synthesized from the method/filename/line number information.

Some of you will thing this is a minor issue. If you want Lua to be mainstream, things like this need to be addressed.

Yes, Lua is a great language. But finding the type of an object sucks. Most languages provide the type by default. Lua does not. You only get the type if the type implementor thought enough to do provide it for you.

Stephen