Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!dali.cs.montana.edu!uakari.primate.wisc.edu!sdd.hp.com!spool.mu.edu!uunet!munnari.oz.au!goanna!ok From: ok@goanna.cs.rmit.oz.au (Richard A. O'Keefe) Newsgroups: comp.lang.fortran Subject: Re: Fortran 90 status Message-ID: <5526@goanna.cs.rmit.oz.au> Date: 2 May 91 05:43:47 GMT References: <1991Apr24.202115.16119@dragon.wpd.sgi.com> <22900@lanl.gov> Organization: Comp Sci, RMIT, Melbourne, Australia Lines: 37 In article <22900@lanl.gov>, jlg@cochiti.lanl.gov (Jim Giles) writes: > A Fortran 77 implementation _could_ have been doing this all > along. The problem is that checking that the arg types match > was a job that the _compiler_ couldn't do because it couldn't > make use of interprocedural knowledge (and remain compatible > with the possibility of separate compilation). That being the > case, the job could only have been done at load-time or run-time. > Nobody wanted to pay for the run-time check, and loaders never > bothered to do it (probably because _some_ people actually want > to cheat the type checking in this way - that's the problem with > not giving the user an _explicit_ way to defeat type checking). This is not quite true. The Burroughs B6700 Fortran compiler did just such a check, and always did so even before there _was_ a B6700. What's more, the compiler _did_ check calls to routines that were in the same source file. No, this did _not_ make anything incompatible with the possibility of separate compilation. Burroughs object files contained full symbol tables. (UNIX object files may do so too. I have never understood why UNIX compilers didn't exploit this.) This facility caught a lot of mistakes, even in code that had allegedly been ``working'' on other machines. When I had to use the Prime Fortran compiler, I was very surprised (not to say dismayed) to find that it didn't do something so obvious (and, having read the source code of the Burroughs compilers and binder, so _easy_). Then I found that this was current practice, and stopped thinking badly of Prime and started thinking highly of Burroughs. Note that you don't need any special facility built into the loaders. UNIX C++ compilers get a lot of mileage out of constructing names that have the types built in (this was described in SP&E a long time ago), just as one feature of the Burroughs compiler was that a subroutine called FRED was known to the binder as "FRED", while a common block called FRED was known to the binder as "/FRED/". -- Bad things happen periodically, and they're going to happen to somebody. Why not you? -- John Allen Paulos.