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: 1108a1,b87849933931bc93 X-Google-Attributes: gid1108a1,public X-Google-Thread: 103376,b87849933931bc93 X-Google-Attributes: gid103376,public X-Google-Thread: 114809,b87849933931bc93 X-Google-Attributes: gid114809,public From: milkweed@plainfield.bypass.com (Anders Pytte) Subject: Re: Definition of "operator" (was: OO, C++, and something much better!) Date: 1997/02/19 Message-ID: #1/1 X-Deja-AN: 220019820 References: <5de62l$f13$1@goanna.cs.rmit.edu.au><32FB8B51.1759@concentric.net> <3302DB3E.F70@concentric.net> <33054E63.C2A@concentric.net> <330789FA.40A5@concentric.net> <01bc1eb2$8fdb7ef0$5f030514@dschauma> Organization: Milkweed Software Newsgroups: comp.lang.c++,comp.lang.smalltalk,comp.lang.eiffel,comp.lang.ada,comp.object Date: 1997-02-19T00:00:00+00:00 List-Id: In article <01bc1eb2$8fdb7ef0$5f030514@dschauma>, "Dave Schaumann" wrote: > Alan Lovejoy wrote in article > <330789FA.40A5@concentric.net>... > > > > So here's a theory: the term "operator" in programming languages was > > coined by applying it to those built-in procedures which were intended > > to > > be analogs of math functions that formally qualify as "operations." > > Yeah, probably. Certainly one of the first uses of computers was to > model mathematical things. The problem is, computers (at least from > an OO point of view) model things in terms of what services they provide, > while mathematics models things in terms of what properties they have. > In mathematics, the statement "1 + 1 = 2" really means there is a set > called "+" containing the value (<1, 1>, 2). In the computer realm, > "1 + 1 = 2" means the ALU object provides an addition service, which > when given the inputs 1 and 1 results in 2. > > > If the theory is true, then a case could be made that a procedure should > > be called an "operation" (and its name an "operator") if its math analog > > formally qualifies as an "operation" (a function whose domain is an > > n-order > > set and whose range is a 1-order set, such as "f(Complex, Complex): > > Complex"). > > > [...] It could be criticised as an ill-advised attempt to pretend > > that math functions and program procedures are equivalent > > Just so. There are some similarities between CS and mathematics that > can be usefully exploited, but it's not hard to go past what these > similarities warrant (take, for example, the "circle is/is not an ellipse > argument on another thread). > > > So the question is: shat should the terms "operator" and "operation" > > mean in computer science? > > What do you mean "in computer science"? If you mean "within a programming > language", then an operator is whatever the language definition says it > is. > > > Do you think the meaning of these terms should or should > > not be anologous to their meaning in math? > > Certainly not. > > > Why or why not? > > Because "CS operators" are fundamentally different from "Math operators". > CS operators perform calculations. Math operators express a relationship. > > -Dave Recall that "mathematics" is a different beast than "arithmetic". I believe the term "operation", implying an action, and the term "operand", implying the thing acted upon, were used in arithmetic much the way they are now used in computer lingo, before computers were around. The terms necessarily have different use in mathematics than in arithmetic, since the actions being performed are more on the order of "transformations". To bring in set theory unnecessarily complicates the issue, although I suppose it impresses some of us. People have been adding and subtracting for a long time with out any underlying set theoretical formulation of what they were doing. You know, words had meaning before computers were around. Why is there such reluctance to be matter of fact common sense practical about these things? I guess that would make boring conversation. Anders. -- Anders Pytte Milkweed Software RR 1, Box 227 Voice: (802) 472-5142 Cabot VT 05647 Internet: milkweed@plainfield.bypass.com