home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!spool.mu.edu!uwm.edu!ogicse!das-news.harvard.edu!spdcc!iecc!compilers-sender
- From: eifrig@beanworld.cs.jhu.edu (Jonathan Eifrig)
- Newsgroups: comp.compilers
- Subject: Re: Compile Time vs. Run Time, Mixed Language Compiling, Fat Code
- Keywords: optimize, performance, debug
- Message-ID: <93-01-068@comp.compilers>
- Date: 12 Jan 93 00:57:55 GMT
- Article-I.D.: comp.93-01-068
- References: <93-01-041@comp.compilers> <93-01-065@comp.compilers>
- Sender: compilers-sender@iecc.cambridge.ma.us
- Reply-To: eifrig@beanworld.cs.jhu.edu (Jonathan Eifrig)
- Organization: The Johns Hopkins University CS Department
- Lines: 43
- Approved: compilers@iecc.cambridge.ma.us
-
- nickh@CS.CMU.EDU (Nick Haines) writes:
- > 4. Use of a language with a good type system eliminates the
- > edit-compile-bomb-edit cycle, ... Typechecking is (in general) much
- > faster than compilation because it includes no optimisation or code
- > transformations.
-
- In article <93-01-065@comp.compilers> jlg@cochiti.lanl.gov (J. Giles) writes:
- >Then your programs are considerably different from what I'm familiar with.
- >Most errors are not syntactic or static semantic errors (like type
- >errors). The vast majority of debugging time is spent isolating and
- >correcting problems which are not - and cannot be - found by the
- >typechecks no matter how strict your type system is.
-
- Hmmm; well, if this is your experience then it is very different
- than mine! I think that my most common coding errors are (in order of
- decreasing frequency):
-
- 1) Typographical errors, such as misspellings of keywords and
- identifiers.
- 2) Failing to pass parameters to a function in the correct order,
- or neglecting to pass all of the necessary parameters.
- 3) Using "=" for "==", especially after I've been coding in
- something other than C for a while! :-)
- 4) Incorrectly dereferencing some pointer to a complicated data
- structure, or incompletely following a chain of pointers.
- 5) Attempting to add new functionality to a piece of code after
- 1:00 AM. :-)
- 6) Bugs in the documentation of system calls and library functions.
- 7) Being a general bonehead!
-
- Obviously, a typechecker will catch most of the errors of types
- 1,2,3,and sometimes 4, which probably accounts for 85% or more of the
- _errors_ in my code. Of course, since these are so easy to fix, this
- probably only amounts to 15% of by debugging _time_. Of course, that is
- to the typechecker's credit, not it's detriment. After all, if one had
- the Acme Super-Duper Bug Remover, that removed all of a programs bugs in
- minutes, you'd say that debugging programs is easy and we should waste our
- time talking about it. ;-)
- --
- Jack Eifrig (eifrig@cs.jhu.edu) The Johns Hopkins University, C.S. Dept.
- --
- Send compilers articles to compilers@iecc.cambridge.ma.us or
- {ima | spdcc | world}!iecc!compilers. Meta-mail to compilers-request.
-