lua-users home
lua-l archive

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


On Fri, Dec 08, 2000 at 12:04:37PM -0800, Falko Poiker wrote:
> Has anyone here modified lua to be case insensitive?  Since we have a whole
> lot of designers poised to do lua scripting, I want to avoid them having to
> debug capitalization errors.  As such, I'd like to modify lua so that it
> ignores case - at least with variable/function names.  Is there an easy way
> to do this?

Better instead to put in setglobal/getglobal functions that check whether the
variable has been earlier "declared" by calling a special function.  Then
you can remove these once you're done with the code to get rid of the
performance hit.  This would take care of case mistakes as well as typos.
We started using that at the beginning of Monkey... Not only did it catch
lots of mistakes, but it encouraged people to document what variables did
at the opint where they "declared" them.

Bret
-- 
Bret Mogilefsky  ** mogul@gelatinous.com **  Programmer, SCEA R&D