From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,45b50f14dadfce5b X-Google-Attributes: gid1164f8,public X-Google-Thread: 102b75,45b50f14dadfce5b X-Google-Attributes: gid102b75,public X-Google-Thread: 110292,45b50f14dadfce5b X-Google-Attributes: gid110292,public From: Craig Burley Subject: Re: Final kick at the "Merced Guessing Game" Date: 1997/10/15 Message-ID: #1/1 X-Deja-AN: 280761713 References: <61g30t$o2n@news-rocq.inria.fr> <61uoiu$19e$1@goanna.cs.rmit.edu.au> <61vbv8$nct@sis.cambridge.arm.com> Organization: Cygnus Support Newsgroups: comp.sys.intel,comp.arch,comp.sys.dec Richard Black writes: > [ Consider 'void reschedule(void)' Fortran might optimise such a thing > out, which might be very bad for your operating system.... ] No, it won't. Fortran *subroutines* are viewed as containing must-be-executed imperative steps, so since `reschedule' would be a subroutine, it *would* be called at the specified point. (You know, we used to write operating systems in Fortran, back before C became popular! :) It's Fortran *functions* that are viewed, to some degree (and, frankly, even the Fortran community and the standards committee itself are widely divided on the extent of this!), as more "functional", or mathematical, in a traditional sense. C doesn't have this concept; a C "function" is really like a Fortran subroutine with a convenient extra "argument" to return a variable. (The debate in the Fortran community over this issue is pretty much bounded by complete agreement that "R = 0 * S()" need not call S() and that "CALL FOO" *must* call FOO. In the sense of the omnipresent "as if" rule, this means their side effects must be performed in the order indicated by their definitions. The debate is over things like whether "R = S()" need call S when that R is not used or is used once as in "T = 0 * R". The FORTRAN 77 and Fortran 90 standards seem to say, especially when all the text and examples are taken into account, that S *must* be called in this case, but some members of the standards committee appear to be claiming either that the F90 standard is not really requiring this, or that future standards won't require it, or both.) Please, everyone keep in mind in these discussions, that there *is* no tradeoff between Fortran, with its "high-level constructs", and C with its "low-level constructs". The tradeoff is between Fortran, which *has* (some) high-level constructs, and C, which does not. *Both* languages have the pertinent low-level constructs: Fortran allows writing code that views memory/arrays as linear just as C does, Fortran allows writing what C has as `&&' and `||', and so on. In some of these cases, Fortran is more verbose (too so for my tastes and the kind of software I write, but I'm not writing numerical software), but C offers *no way* for a programmer to express multi-dimensional arrays, Fortran's (and English's ;-) .AND. and .OR., and so on. -- "Practice random senselessness and act kind of beautiful." James Craig Burley, Software Craftsperson burley@gnu.ai.mit.edu