# New Science Discovery: Perl Idiots Remain Idiots After A Decade!New Science Discovery: Perl Idiots Remain Idiots After A Decade!

Albert van der Horst albert at spenarnc.xs4all.nl
Mon Mar 12 20:00:30 CET 2012

```In article <4f5df4b3\$0\$1375\$4fafbaef at reader1.news.tin.it>,
Kiuhnm  <kiuhnm03.4t.yahoo.it> wrote:
>On 3/12/2012 12:27, Albert van der Horst wrote:
>> Interestingly in mathematics associative means that it doesn't matter
>> whether you use (a.b).c or a.(b.c).
>> Using xxx-associativity to indicate that it *does* matter is
>> a bit perverse, but the Perl people are not to blame if they use
>> a term in their usual sense.
>
>You may see it this way:
>Def1. An operator +:SxS->S is left-associative iff
>   a+b+c = (a+b)+c for all a,b,c in S.
>Def2. An operator +:SxS->S is right-associative iff
>   a+b+c = a+(b+c) for all a,b,c in S.
>Def3. An operator +:SxS->S is associative iff it is both left and
>right-associative.

I know, but what the mathematicians do make so much more sense:
(a+b)+c = a+(b+c)    definition of associative.
Henceforth we may leave out the brackets.

Don't leave out the brackets if the operators if the operators is
not associative.

P.S. There is no need for the operators to be SxS->S.
For example a b c may be m by n, n by l, l by k matrices respectively.

>
>Kiuhnm

Groetjes Albert

--
--
Albert van der Horst, UTRECHT,THE NETHERLANDS
Economic growth -- being exponential -- ultimately falters.
albert at spe&ar&c.xs4all.nl &=n http://home.hccnet.nl/a.w.m.van.der.horst

```

More information about the Python-list mailing list