lua-users home
lua-l archive

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


Op So., 2 Sep. 2018 om 21:15 het Roberto Ierusalimschy
<roberto@inf.puc-rio.br> geskryf:
>
> > It has solved the problem of retrieving unassigned globals. It's
> > called 'strict.lua'. It's not in the distribution. Maybe it should be.
> > But Penlight and stdlib both supply it.
> >
> > It has not solved the problem of mind-reading the programmer. If you
> > have variables x1 and xi, and by accident type xi when you mean x1,
> > not even strict.lua will complain.
>
> strict.lua will also not complain if you write '<' instead of '>', or
> '<' instead '<=', or '+1' instead of nothing, or nothing istead of '+1',
> etc. In my view, they are all in the same category of typos in
> indentifiers, and very few languages detect them (coq?). OTOH,
> Enrico's sect seems to cure that, too.

The so-called London sect [1] indulges in an even darker and less-known ritual.

> The often asked question, "How can one demonstrate that a computer program does what it is supposed to do?" has at least three answers:
> (i) use the standard debugging technique of testing "representative" data and checking the results,
> (ii) read the program and mysteriously discern that it works, thereby convincing oneself that the program is right or
> (iii) give a rigorous mathematical proof of the correctness of the program.

-- Dirk

[1] https://slideheaven.com/proving-programs-correct-some-techniques-and-examples.html