lua-users home
lua-l archive

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


On 15 March 2018 at 13:51, ThePhD <jm3689@columbia.edu> wrote:
> - Things explode at runtime, which a quick compiler check or linter check
> could have saved me on. (Not just parsing my code. 'Did you mean to type
> polx instead of polex?' Would have saved me 2 hours of tired, baggy-eyed
> print()-ing)
> -- Subset of above, many libraries handle `nil` because there's no
> distinction in the language of `nil` versus `none`, making `nil` parameters
> from that mistyped global get defaulted to some default value that just
> manifests itself in specific runtime conditions and I guess it's time to do
> some more debugging and vigorous checking and aaaaaah.

Why don't you use a linter?
luacheck is great at catching the simpler sort of things.
https://github.com/mpeterv/luacheck

> -- Subset of Above: I've been thinking about developing a Typescript-alike for Lua that compiles to whatever version of Lua you desire and takes care of polyfills and other such things for you

See TypedLua and now Titan.