Re: Compile Time vs. Run Time, Mixed Language Compiling, Fat Code

jlg@cochiti.lanl.gov (J. Giles)
Tue, 12 Jan 1993 19:22:48 GMT

          From comp.compilers

Related articles
Compile Time vs. Run Time TDARCOS@MCIMAIL.COM (Paul Robinson) (1993-01-08)
Re: Compile Time vs. Run Time, Mixed Language Compiling, Fat Code nickh@CS.CMU.EDU (1993-01-08)
Re: Compile Time vs. Run Time, Mixed Language Compiling, Fat Code jlg@cochiti.lanl.gov (1993-01-11)
Re: Compile Time vs. Run Time, Mixed Language Compiling, Fat Code eifrig@beanworld.cs.jhu.edu (1993-01-12)
Re: Compile Time vs. Run Time, Mixed Language Compiling, Fat Code tmb@arolla.idiap.ch (1993-01-12)
Re: Compile Time vs. Run Time, Mixed Language Compiling, Fat Code jlg@cochiti.lanl.gov (1993-01-12)
Re: Compile Time vs. Run Time, Mixed Language Compiling, Fat Code drw@euclid.mit.edu (1993-01-12)
Re: Compile Time vs. Run Time, Mixed Language Compiling, Fat Code wilson@ann-arbor.applicon.slb.com (1993-01-13)
Re: Compile Time vs. Run Time, Mixed Language Compiling, Fat Code nickh@CS.CMU.EDU (1993-01-13)
Re: Compile Time vs. Run Time, Mixed Language Compiling, Fat Code chased@rbbb.Eng.Sun.COM (1993-01-13)
Re: Compile Time vs. Run Time, Mixed Language Compiling, Fat Code bart@cs.uoregon.edu (1993-01-14)
Re: Compile Time vs. Run Time, Mixed Language Compiling, Fat Code rv@erix.ericsson.se (1993-01-14)
[3 later articles]
| List of all articles for this month |

Newsgroups: comp.compilers
From: jlg@cochiti.lanl.gov (J. Giles)
Organization: Los Alamos National Laboratory
Date: Tue, 12 Jan 1993 19:22:48 GMT
References: 93-01-041 93-01-068
Keywords: types, debug

I'm sorry for not being clear.


I said:
jlg> Then your programs are considerably different from what I'm familiar
jlg> with. Most errors are not syntactic or static semantic errors (like type
jlg> errors). The vast majority of debugging time is spent isolating and
jlg> correcting problems which are not - and cannot be - found by the
jlg> typechecks no matter how strict your type system is.


To which Jonathan Eifrig replied replied giving a list of types of errors
and their nature. What he said was true. However, it does not address
the point I was making. The article I was responding to made claim that
programs which pass the typechecker of a strictly typed language never
have bugs (the exact statement was " An SML program which successfully
typechecks will not bomb at runtime").


This latter is clearly wrong. Not only *CAN* programs which are free of
type errors still contain bugs, those remaining bugs are the hardest to
find and correct: they account for the vast majority of debugging time.
I've seen this claim made several times before - that functional languages
eliminate all bugs. The first time was when the old VAL language was
being discussed in a seminar. Someone asked whether there was any
provision for an interactive debugging tool in a VAL environment and the
answer was (and the guy was serious - or the best actor in the world) that
debugging wasn't necessary since the code would be written in VAL.


In fact, I would be surprised if SML were so restrictive as to guarantee
bomb-free code once you pass the typechecker. To be a useful, a
programming language must allow sufficient flexibility to the user for a
wide variety of algorithms and applications to be legally encoded. This
means that the language will also *inherently* be sufficiently flexible
for the user to inadvertantly code unintended, but still legal programs.
That is in the very nature of programming language design.


--
J. Giles
--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.