🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.misc
Article #2464

Re: Fortran vs. C for numerical work

#2464
From: Dan Bernstein
Date: Mon, 10 Dec 1990 00:04
15 lines
1191 bytes
In article <77124@iuvax.cs.indiana.edu> templon@copper.ucs.indiana.edu (jeffrey templon) writes:
> the problem i think most fortran-scientific-types have with C is that it
> is 'economic in expression' to misquote k&r.  constructs like
> 	b = sqrt( a < 0 ? -a : a)
> look very strange to a fortran programmer, compared to
  [ the equivalent 5-line if-then-else in Fortran ]

There is one big advantage to conciseness: readability. People often
underestimate how important it is to have complete context on the same
page. You have to balance this against the disadvantage of unfamiliar
notations. For a C programmer, ?: is perfectly natural, so the above
expression has the advantage of taking up less space without any
disadvantages.

---Dan
Technical Details
Message-ID: <1284:Dec1000:04:3190@kramden.acf.nyu.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rutgers!hsdndev!cmcl2!kramden.acf.nyu.edu!brnstnd
References: <18016@hydra.gatech.EDU> <16671@csli.Stanford.EDU> <77124@iuvax.cs.indiana.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rutgers!hsdndev!cmcl2!kramden.acf.nyu.edu!brnstnd
From: brnstnd@kramden.acf.nyu.edu (Dan Bernstein)
Newsgroups: comp.lang.misc
Subject: Re: Fortran vs. C for numerical work
Message-ID: <1284:Dec1000:04:3190@kramden.acf.nyu.edu>
Date: 10 Dec 90 00:04:31 GMT
References: <18016@hydra.gatech.EDU> <16671@csli.Stanford.EDU> <77124@iuvax.cs.indiana.edu>
Organization: IR
Lines: 15