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

tmb@arolla.idiap.ch (Thomas M. Breuel)
Tue, 12 Jan 1993 22:59:32 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)
[4 later articles]
| List of all articles for this month |

Newsgroups: comp.compilers
From: tmb@arolla.idiap.ch (Thomas M. Breuel)
Organization: IDIAP
Date: Tue, 12 Jan 1993 22:59:32 GMT
Keywords: debug, types
References: 93-01-041 93-01-065

nickh@CS.CMU.EDU (Nick Haines) writes:
> An SML program which successfully typechecks will not
> bomb [due to type errors] at runtime.


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).


Actually, both of you are probably right.


For example, in FORTRAN, most programming mistakes don't show up as type
errors. The reason is that the FORTRAN type system isn't very expressive,
relying on arrays of numbers to represent many different kinds of data
structures (this kind of programming style is often carried over by its
practitioners to other languages; see, for example, "Numerical Recipes in
C").


The SML type system, however, lets the programmer tell the compiler a lot
about his data structures and their interrelationships. This means that
if you take advantage of the added expressiveness of the SML type system,
many errors that are not type errors in most other languages will be
caught by the type checker.


So, extensive static typechecking alone doesn't automatically find more
errors in your programs. You also need an expressive type system, and you
need to use it.


Incidentally, having reimplemented a number of FORTRAN programs in SML, my
impression is that even hardcore numerical programs benefit greatly from
use of a more expressive type system.


Thomas.
--


Post a followup to this message

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