Tugger the SLUGger!SLUG Mailing List Archives

[SLUG] Re: dynamic vs static type checking

On Tue, 2005-09-27 at 12:00 +1000, Bruce Badger wrote:
> [good things about run-time behaviour of modern interpretive languages]

This isn't my gripe, and I'm not certain it's Erik's, either.  I don't
care when in the process the code is compiled (well, I do, for embedded
code) so long as I don't notice.

As a developer intent on doing the best job possible,  I want to
discover whole classes of bugs long before the corresponding unit test
is executed.  (E.g. my keyboard can't spel.)

What is essential in a production environment is a way to validate the
code for trivially stupid mistakes, like a = b.c where b is an int, and
c is a struct member; or prentf("%g\m", 4); information that some simple
static analysis would find.  Of great interest, of course, are the
subtle bugs that more complex static analysis can find.  Preferably in
combination with some process which makes it impossible to put
unvalidated into production; which is an oft-overlooked (and
undervalued) advantage of compiled languages.

The worst are some interpretive languages where whole code blocks are
parsed at run time, creating the wonderful situation where customers (!)
ring up and say "what does syntax error mean?" because no test case went
down that code branch.  This is ZERO improvement on 30 years ago when
customers routinely reported "goto 40: no such line" types of errors in
Basic programs.

Peter Miller <millerp@xxxxxxxxxxxxxxxx>
/\/\*        http://www.canb.auug.org.au/~millerp/

PGP public key ID: 1024D/D0EDB64D
fingerprint = AD0A C5DF C426 4F03 5D53  2BDB 18D8 A4E2 D0ED B64D
See http://www.keyserver.net or any PGP keyserver for public key.

Attachment: signature.asc
Description: This is a digitally signed message part