From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 109fba,b87849933931bc93 X-Google-Attributes: gid109fba,public X-Google-Thread: fac41,b87849933931bc93 X-Google-Attributes: gidfac41,public X-Google-Thread: 114809,b87849933931bc93 X-Google-Attributes: gid114809,public X-Google-Thread: 103376,b87849933931bc93 X-Google-Attributes: gid103376,public X-Google-Thread: 1108a1,b87849933931bc93 X-Google-Attributes: gid1108a1,public From: William Clodius Subject: Re: OO, C++, and something much better! Date: 1997/02/19 Message-ID: <330B1B1F.6102@lanl.gov>#1/1 X-Deja-AN: 219889307 References: <5de62l$f13$1@goanna.cs.rmit.edu.au> <32FB8B51.1759@concentric.net> <5dua51$h41$1@goanna.cs.rmit.edu.au> <3302F8B8.3F60@concentric.net> <5eb4s4$jj5$1@goanna.cs.rmit.edu.au> Content-Type: text/plain; charset=us-ascii Organization: Los Alamos National Lab Mime-Version: 1.0 Newsgroups: comp.lang.c++,comp.lang.smalltalk,comp.lang.eiffel,comp.lang.ada,comp.object X-Mailer: Mozilla 2.01S (X11; I; IRIX 6.2 IP22) Date: 1997-02-19T00:00:00+00:00 List-Id: Richard A. O'Keefe wrote: > > However, in all of the languages I > mentioned, there is ***NO SEMANTIC DIFFERENCE*** between symbols that > may be used as operators and symbols that may not. In Ada, "abs X" > involves the use of an operator. In Fortran, "ABS(X)" involves the > use of a "function". But the range of *semantic* possibilities is > *identical* for both languages. Minor quibble. I believe in Fortran 90, and possibly in some of the other languages, operators have additional semantic constraints that are not required by the language for functions in general, i.e., the corresponding function may not have certain obvious side effects such as modifying its arguments, SAVEd local variables, modifying global variables, etc. Side effects such as stack overflow, floating point exceptions, etc. are of course allowed as there is no practical means of preventing them. (Quibble on the quibble. While Fortran allows functions to nominally have side effects that are not allowed for operators its rules for expression evaluation makes reliance on the occurance of such side effects error prone. Well written production Fortran code should ideally only have functions that satisfy the semantics of operators.) -- William B. Clodius Phone: (505)-665-9370 Los Alamos Nat. Lab., NIS-2 FAX: (505)-667-3815 PO Box 1663, MS-C323 Group office: (505)-667-5776 Los Alamos, NM 87545 Email: wclodius@lanl.gov