Path: utzoo!attcan!uunet!lll-winken!lll-tis!ames!nrl-cmf!cmcl2!phri!marob!samperi From: samperi@marob.MASA.COM (Dominick Samperi) Newsgroups: comp.lang.fortran Subject: Re: Fortran versus C for numerical analysis Message-ID: <408@marob.MASA.COM> Date: 9 Sep 88 13:43:27 GMT References: <1421@ficc.uu.net> <3349@lanl.gov> Reply-To: samperi@marob.masa.com (Dominick Samperi) Organization: ESCC New York City Lines: 42 In article <3349@lanl.gov> jlg@lanl.gov (Jim Giles) writes: >the rules of C (there are rules in C?) do. The problem with C is that >it provides _no_ way to force a given order of expression evaluation But you criticized C (ANSI C) for forcing a left-to-right evaluation order in expressions like a+b+c+d in a previous posting. The beauty of C stems from the mathematical consistency of its rules; the new (strict) associativity rules for mathematical expressions is a natural extension of the associativity rules for the non-mathematical C operators, which enable the programmer to predict exactly how an expression will be evaluated. True, ANSI C is not yet an "official" standard, but neither is the current C, yet the current language has undergone very few changes in 10+ years of use. I maintain that the reason for this remarkable stability is the mathematical consistency of the language, together with its fine data structuring capabilities, and its low-level features (which facilitate the design of portable code). ANSI conformant C compilers are already in existence, and I suspect that most C compilers will conform to this standard in the near future, even if the standard is never published! (Well, one might say that it has already been published, in the Second Edition of K&R's text, which has been the definitive working standard for the last 10 years.) I'm sure that the new FORTRAN standard will address many of the shortcommings of the language: no support for data abstraction (no data structuring tools), no support for information hiding (all function identifiers are globally accessible), no recursion, identifiers limited to 6 characters, automatic variable typing via the "first letter rule," ambiguous or inconsistent specs. (the simple operators associate left-to-right, except for **, which associates right-to-left, but forget this because the compiler can do what it pleases for optimization...), programming guidelines made part of the language spec., etc. Unfortunately, last I heard was that this new FORTRAN standard is not likely to appear for a long time, due to the inability of the committee to agree on anything. -- Dominick Samperi, NYC samperi@acf8.NYU.EDU samperi@marob.MASA.COM cmcl2!phri!marob uunet!hombre!samperi (^ ell)