[whatwg] 2.3 editorial: operators, operations, or ?

Aryeh Gregor Simetrical+w3c at gmail.com
Sat Aug 15 19:11:58 PDT 2009


On Sat, Aug 15, 2009 at 9:16 AM, Elliotte Rusty
Harold<elharo at ibiblio.org> wrote:
> A function is not an operator. According to Wikipedia, "In
> mathematics, an operator is a function which operates on (or modifies)
> another function." A comparison is an operation on strings (data), not
> on other functions.

In mathematics, "operator" is often defined to be a function from a
set (or some finite Cartesian product of the set with itself) to the
same set.  Or, really, it can be used to just mean an arbitrary
function, like "linear operator" meaning the same as "linear
map"/"linear transformation".

The Wikipedia article contradicts itself.  In the lede, it has the
quote you cite, but later it says:

"The word operator can in principle be applied to any function.
However, in practice it is most often applied to functions which
operate on mathematical entities of higher complexity than real
numbers, such as vectors, random variables, or mathematical
expressions."

The second statement is correct.  I've corrected the first.

Of course, in mathematical parlance, operators do have to be
functions, and comparisons usually aren't viewed as functions in
mathematics.  They're viewed as orderings, a different type of
relation.  But you could always view an arbitrary relation as a
function with range {0, 1}, and in computing, "comparison operator" is
common.

I do agree that "comparison operator" sounds a little weird in this
context.  I can't really put my finger on why, though, or think of a
better term.  I think it's harmless, anyway, and not worth wasting
much time on given the amount of real work to be done.



More information about the whatwg mailing list