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: jsa@alexandria (Jon S Anthony) Subject: Re: OO, C++, and something much better! Date: 1997/02/25 Message-ID: #1/1 X-Deja-AN: 221517996 Distribution: world References: <5de62l$f13$1@goanna.cs.rmit.edu.au> Organization: PSI Public Usenet Link Newsgroups: comp.lang.c++,comp.lang.smalltalk,comp.lang.eiffel,comp.lang.ada,comp.object Date: 1997-02-25T00:00:00+00:00 List-Id: In article <5etrns$sh3$1@goanna.cs.rmit.edu.au> ok@goanna.cs.rmit.edu.au (Richard A. O'Keefe) writes: > jsa@alexandria (Jon S Anthony) writes: > > >In article <5eb4s4$jj5$1@goanna.cs.rmit.edu.au> ok@goanna.cs.rmit.edu.au (Richard A. O'Keefe) writes: > > >> There is a useful *syntactic* distinction between > > ^^^^^^ > >> "normal functions" f(x), g(x, y) > >> "operators" f x x g y > >> "special syntax" <> x[y] > > >I'm not convinced. Pleasant perhaps, but really useful? In what way? > > What I wrote was ambiguous. > I did not mean that it was useful to _have_ the distinction. > What I meant was that since the distinction has been > imposed on us, it is useful to have a way of _talking_ about it. Ahhh. Makes perfectly good sense. > >> So how on earth is this supposed to make it _not_ an operator? > > >Simple. For Alan the term "operator" should be distinguished by its > >semantic. > > Yes, but he has completely failed to come up with a "semantic" that > distinguishes "+" from anything else. Well. Yes. That's true. > The fundamental point here is that programming languages exist, and we > need ways to talk about them clearly. It doesn't do anyone any good > to go "whaa, *I* wanna call + a subroutine" or anything like that. Right. At this point the terminology is set in concrete. Or as Kosh would say, "The avalanch has already begun. It is too late for the pebbles to vote." > It doesn't even do any good to say "whaa, _mathematicians_ say xyz", > because (a) mathematical usage is by no means uniform, and (b) programming > languages are a different domain of discourse, and the re-use of words > in different domains is a standard feature of English. Agreed. However, note that the mathematical usage in this case (what an operation is) is pretty uniform. I have not seen a case where there has been a real exception. > Let me cite Burris & Sankappanavar, "A Course in Universal Algebra". > Ch II, Definition 1.1, p23. > For $A$ a nonempty set and $n$ a nonnegative integer we define > $A^0 = {\phi}$, and, for $n > 0$, $A^n$ is the set of $n$-tuples > of elements from $A$. An $n$-{\it ary operation\/} > (or {\it function\/) {\it on} $A$ is any function $f$ from > $A^n$ to $A$; $n$ is the {\it arity} (or {\it rank\/}) of $f$. > \dots An operation $f$ on $A$ is called a {\it nullary} operation > \dots if its arity is zero. \dots An operation $f$ on $A$ is > {\it unary}, {\it binary}, or {\it ternary} if its arity is 1, 2, > or 3, respectively. > > Someone incorrectly claimed that the mathematical word for these things > was "operator". It is in fact "operation". I think we can all agree Despite being mangled by news, I can make out that this conforms with the usual sense of the term "operation" in mathematics. As for "operator", the term is usually applied to the glyph denoting an operation. But, in actual practice this is typically slopped over because it is not a useful working distinction. Shrug. > The point that I am making is simply that there is an established word > "operator" used consistently in the standards for many current programming > languages to refer to a small set of built in operatIONS with special > syntax. This isn't _intended_ to conform to any advanced mathematical > usage. Exactly. You've stated this quite well on other occasions. > You may _regret_ the use of the word "operator" for a *syntactic* > category in programming language standards, but it is humptydumptyism > to try to pretend that it isn't so. Completely agree. /Jon -- Jon Anthony Organon Motives, Inc. Belmont, MA 02178 617.484.3383 jsa@organon.com