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: fac41,b87849933931bc93 X-Google-Attributes: gidfac41,public X-Google-Thread: 109fba,b87849933931bc93 X-Google-Attributes: gid109fba,public X-Google-Thread: 1108a1,b87849933931bc93 X-Google-Attributes: gid1108a1,public X-Google-Thread: 114809,b87849933931bc93 X-Google-Attributes: gid114809,public X-Google-Thread: 103376,b87849933931bc93 X-Google-Attributes: gid103376,public From: Mike Klein Subject: Re: OO, C++, and something much better! Date: 1997/02/19 Message-ID: <330B9703.219A@alumni.caltech.edu>#1/1 X-Deja-AN: 219976728 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> <330B1B1F.6102@lanl.gov> Content-Type: text/plain; charset=us-ascii Organization: Codehenge Mime-Version: 1.0 Newsgroups: comp.lang.c++,comp.lang.smalltalk,comp.lang.eiffel,comp.lang.ada,comp.object X-Mailer: Mozilla 3.01Gold (X11; I; SunOS 5.5 sun4u) Date: 1997-02-19T00:00:00+00:00 List-Id: William Clodius wrote: > > 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.) > Dont we already have terms for these concepts: imperitive (called for side effects) functional (no side effects, return value only) Of course, most code is dysfunctional, but that's an other story :-) Mike Klein -- mailto:mklein@alumni.caltech.edu http://www.alumni.caltech.edu/~mklein