lua-users home
lua-l archive

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

It was thus said that the Great Martin once stated:
> On 03/03/2017 08:26 PM, Dirk Laurie wrote:
> > What is the main reason for using Luacheck?
> >
> > (a) A debugging tool.
> > (b) Enforcing a certain style of coding.
> > (c) Advising a programmer on things in his program that
> > might make trouble one day.
> >
> All use cases I encountered in production work was (b).

  And mine are (c).  luacheck helped fine some potential bugs in the code at
work (mostly inadvertent globals but some mistakes on shadowing previous

> > Turing has already taught us that we can't use
> > a program to test correctness of a program. Why clutter
> > Luacheck with exceptional cases?
> Especially in dynamic languages as Lua. Where functions can
> generate functions and arbitrary string can be converted to
> function via load().
> I believe only way to get result of program is execute it.
> (And hope Turing believed/proved this too.)

  While it's true in general that Turing proved that there are some things a
program can't determine from source code alone, that shouldn't preclude the
checks we *can* do to minimize bugs.

  -spc (And those checks that luacheck does that I disagree with I disable ... )