in reply to Re: Perl 6 - Operator renaming
in thread Perl 6 - Operator renaming

That's an easy one...
  1. '+' should be associative (like in mathematics).
  2. Concatenation isn't associative.
  3. Therefore, concatenations shouldn't be denoted by '+'.

Replies are listed 'Best First'.
Re^3: Perl 6 - Operator renaming
by blokhead (Monsignor) on Sep 01, 2005 at 21:05 UTC
    Concatenation isn't associative.
    This is, of course, completely wrong. Mathematically, the set of all strings over an alphabet forms a (associative) monoid under the concatenation operator.

    Did you mean commutative?

    blokhead

      For those of us mere mortals.
      • Given a set A with members a, b, c, and an operator *, * is said to be an associative operation iff (a * b) * c = a * (b * c) for arbitrary a, b, c within A. Even plainer: the order in which you take operations doesn't matter.
      • Given a set A with members, a, b, and an operator *, * is said to be a commutative operation iff a * b = b * a for arbitrary a, b within A. Even plainer: operand order doesn't matter.

      thor

      Feel the white light, the light within
      Be your own disciple, fan the sparks of will
      For all of us waiting, your kingdom will come

      <