lua-users home
lua-l archive

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

Personally, I like "cumbersome" code very much. To the reader, it
clearly tells what you want to do (check if the object has a property
"mass" and if it has, compare it).

The coder in me tends to agree. However this system is intended to be used by non-programmers and should be as simple and as robust as possible. For example I have a text box where they can type a criteria for searching objects. The text can be as simple as "return obj.mass>20" (give me all objects that have a mass>20). I want to minimize the possibility for syntax and runtime errors.