Path: utzoo!attcan!uunet!yale!cmcl2!lanl!jlg From: jlg@lanl.gov (Jim Giles) Newsgroups: comp.lang.fortran Subject: Re: intrinsic functions, math operators (was: i++, i+=1, i=i+1) Message-ID: <3976@lanl.gov> Date: 21 Sep 88 22:33:15 GMT References: <1031@amelia.nas.nasa.gov> Organization: Los Alamos National Laboratory Lines: 25 From article <1031@amelia.nas.nasa.gov>, by fouts@lemming.nas.nasa.gov.nas.nasa.gov (Marty Fouts): > [...] My reading of the draft shows > any of these to be allowed; provided that in all cases the user is > allowed to override the standard version with a private version. Yes, but the method of overriding the standard version is different for each of the implementation methods that you mention. This means that a code which really does override a standard procedure definition will not be portable. It is this lack of portability that I object to. By the way, you said you liked your optimizer to figure out a new semantics for itself rather than coding it into the compiler. This works just fine if the information required for the optimizer to do it's work can be gleaned from the code skeletons or macros that define the new feature. If not (as in the case of complex numbers, for example) the method of modifying the compiler will usually produce better code that one which is extended by the other mechanisms. For example, if I have a bunch of macros that define SINE and COSINE functions (how to evaluate), I still won't be able to optimize SIN(x)*SIN(x)+COS(x)*COS(x) as well as a compiler could do if it had the semantics of trig functions built-in (the optimal evaluation strategy is to replace the whole expression with the constant 1). J. Giles Los Alamos