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

On Sat, Aug 15, 2009 at 4:40 AM, Ian Hickson<ian at hixie.ch> wrote:
> On Mon, 10 Aug 2009, Elliotte Rusty Harold wrote:
>>
>> "This specification defines several comparison operators for strings."
>>
>> Really, operators? Is this the right word here? Maybe it should be
>> "several comparison operations on strings" or "several possible
>> comparisons for strings.
>
> What's wrong with operators? They are literally functions that the rest of
> the spec uses, it seems like the right word here.


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 traditional programming languages such as Java and C, an operator
is usually a language defined symbol, and occasionally a user defined
symbol. That also doesn't apply here. For instance, in Java,
"operators are special symbols that perform specific operations on
one, two, or three operands, and then return a result."

What you're describing is likely a function or perhaps an operation,
but I don't think it's an operator in the commonly understood senses
of the term amongst the people likely to be reading this spec.

-- 
Elliotte Rusty Harold
elharo at ibiblio.org

Received on Saturday, 15 August 2009 06:16:38 UTC