Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!rutgers!rochester!uhura.cc.rochester.edu!ur-valhalla!galaxy.ee.rochester.edu!davis From: davis@galaxy.ee.rochester.edu (Al Davis) Newsgroups: comp.lang.fortran Subject: Re: Fortran versus C for numerical analysis Summary: any language has problems, if you don't know it. Message-ID: <1454@valhalla.ee.rochester.edu> Date: 13 Sep 88 03:09:07 GMT References: <408@marob.MASA.COM> <3417@lanl.gov> Sender: usenet@valhalla.ee.rochester.edu Reply-To: davis@galaxy.ee.rochester.edu (Al Davis) Organization: UR Dept. of Electrical Engg, Rochester NY 14627 Lines: 49 In article <3417@lanl.gov> jlg@lanl.gov (Jim Giles) writes......: >(comments on consistency, expressions like i=f(i++), etc. To catch all possiblilites is impossible. To restrict this kind of thing would unnecesarily cripple the language, and make it harder to read. It is up to the coder to code clearly. >(in response to comment that Fortran commitee can't agree on anything) >The same might be said of the C committee. C is out for its _third_ >public review (Fortran has only had one so far). Only one because they can't...... at least the C committee publishes >(comments on the unary syntax, C is cryptic, etc.) Any language is cryptic if you don't know it. I like the C terse syntax. I find it interesting that Fortran users who complain loudest about often are mathematicians who use lots of terse, cryptic math notation in their writings. The reason is clear: terse is easier to read, if you know the language. It is unfortunate that much of the code written is of poor quality, but that is not an indication that the language is poor. It seems all languages have their share. >the lack of even the _concept_ of an array (the array syntax >is instantly turned into pointers - there is no semantic concept of arrays), Fortran and C handle arrays in almost the same way, if you insist. C programmers rarely do it that way, because the pointer and dynamic allocation approach is much more flexible. If you understand C's dynamic allocation, Fortran's conformant arrays look painfully error prone and primitive. If you want to look at it this way, Fortran has no semantic concept of a CONSTANT. oops. >(no single precision, no complex, etc.) C does have some faults. I wish ANSI would fix it. C++ fixes it, and more. The no single precision (actually there is single precision, but the type conversions often eliminate the speed advantages, and ANSI did fix this. I never use single precision anyway, it is not accurate enough.) is a consequence of two bad moves: portability at the expense of function, and taking K&R too literally. >J. Giles >Los Alamos I am curious why Ratfor isn't used more. I think I know the real reason, and it isn't portability. Albert Davis University of Rochester