lua-users home
lua-l archive

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

If you are taking suggestions for the next Lua release, mine would is that it would be nice to have more detailed compiler messages.

For example, considering assignment instead of a test:

   a = 1
   if a = 1 then foo end

   Error: Loading Module 'Script Document1': :2: `then' expected near `='

With some fonts, = looks a lot like ==. If the test is complex, finding a buried = can get hairy. Would it be possible to flag that as looking like the programmer intended to do a test and accidentally did an assignment?

Here's another one:

   `=' expected near `ot'

is thrown by

   ifn ot CMyClass then

OK, I know this is obvious, but this one sometimes gets tough if you have the right combination of characters.

There are plenty more examples where a more sophisticated error message would be a great help.