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=3.8 required=5.0 tests=BAYES_00,INVALID_MSGID, RATWARE_MS_HASH,RATWARE_OUTLOOK_NONAME 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: 114809,b87849933931bc93 X-Google-Attributes: gid114809,public X-Google-Thread: 1108a1,b87849933931bc93 X-Google-Attributes: gid1108a1,public X-Google-Thread: 103376,b87849933931bc93 X-Google-Attributes: gid103376,public From: "Dave Schaumann" Subject: Re: Definition of "operator" (was: OO, C++, and something much better!) Date: 1997/02/19 Message-ID: <01bc1eb2$8fdb7ef0$5f030514@dschauma>#1/1 X-Deja-AN: 220125133 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> Organization: CSC 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: 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