Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site ut-ngp.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!genrad!panda!talcott!harvard!seismo!ut-sally!ut-ngp!kjm From: kjm@ut-ngp.UUCP (Ken Montgomery) Newsgroups: net.lang.c Subject: Re: Vectorizing C compiler for the Cray Message-ID: <1555@ut-ngp.UUCP> Date: Wed, 3-Apr-85 14:15:57 EST Article-I.D.: ut-ngp.1555 Posted: Wed Apr 3 14:15:57 1985 Date-Received: Fri, 5-Apr-85 03:37:06 EST References: <486@lll-crg.ARPA> Distribution: net Organization: U.Texas Computation Center, Austin, Texas Lines: 40 [] From: brooks@lll-crg.ARPA (Eugene D. Brooks III) >After a lot of procrastination we are finally going to get a Vectorizing >C compiler for the Cray computers for those interested in doing numerical >work in the C language. Just think, a C program running at 160 megaflops. >This will be great! Sounds like fun! (Not to mention useful!) >A committee at LLNL has studied the language and its suitability for numerical >work and is implementing the full C language with one minor modification. >In order to have compatibility with Fortran all subroutine parameters will >be passed by address. A small price to pay for good floating point performance >don't you think? No. What you have after that modification is no longer C. To wit, K&R has a *whole section* (#1.8, on page 24) titled "Arguments - Call by Value". Call-by-value is justified as follows: ... because arguments can be treated as conveniently initialized local variables in the called routine. I submit that many, many programs take advantage of this feature, so the change to call-by-reference would break a large amount of existing software. In addition, call-by-reference is unsafe, since one has no idea what a routine loaded from someone else's object library does to its arguments. (Yes, I know one can program around this, but the work-around is a crock.) As already mentioned, call-by-reference can be simulated where necessary with pointers (or you could define the 'fortran' keyword as a way to force call-by-reference to individual functions). -- The above viewpoints are mine. They are unrelated to those of anyone else, including my cats and my employer. Ken Montgomery "Shredder-of-hapless-smurfs" ...!{ihnp4,allegra,seismo!ut-sally}!ut-ngp!kjm [Usenet, when working] kjm@ut-ngp.ARPA [for Arpanauts only]