[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Say No to global-by-default
- From: Sean Conner <sean@...>
- Date: Wed, 4 Jul 2018 16:16:59 -0400
It was thus said that the Great Egor Skriptunoff once stated:
> On Wed, Jul 4, 2018 at 11:47 AM, Pierre Chapuis wrote:
>
> > My take on this is: this is not really necessary, just use luacheck.
> >
> >
> Yes, using special 3rd party software for checking Lua scripts is a true
> solution.
But people use third party software for debugging, aka debuggers.
luacheck is just a special type of debugger. Heck, a lot of programmers use
IDEs and simply can't deal with using a normal text editor. Is that a
crutch? [1]
> But I think checking for misspelled variable names is quite important to be
> inside Lua core.
And yet, Lua doesn't warn me when I inadvertantly reassigned a variable
with a different type [2] and *that* error is just as nasty as a typo ...
-spc (So, how much do we protect ourselves from ourselves?)
[1] http://boston.conman.org/2009/11/02.1
http://boston.conman.org/2009/11/03.1
[2] That bit be recently. I had [3]:
local url = require "org.conman.parsers.url.url"
local lpeg = require "lpeg"
-- ...
local seconds = P"T"
local remoteuser = (modifier * P"u")
/ function() return Cg(e_atom,"ruser") end
local url = P"U"
local servername = P"v"
-- ...
local pat = apache:match[[[[%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %{outstream}n/%{instream}n (%{ratio}n%%)]]
-- ...
data = pat:match(log_entry)
data['Referer'] = url:match(data['Referer'])
-- oops!
[3] Code still isn't finished.