|
Posted by Chung Leong on 05/28/06 18:30
Rik wrote:
> Order matters, even in math.
> 5 - 7 != 7 - 5
Well, I didn't say - or / is communtative. Substraction and division
are derived from addition and multiplication. The latters are
fundamental operation and you want to preserve their properties since
they underpin everything else.
It's been ages since I took linear algebra, but I remember correctly,
you have a proper vector space only if
1. Addition is communtative
2. There is a zero vector such that A + 0 = A
3. Multiplication is communtative
4. There is a unity vector such that 1 x A = A
If addition is not communtative, you end up with non-linear math.
> Actually, '.' & '+' are kin of the same operator, but for different types.
> It adds the piece on the right to the piece on the left. When '.', it
> handles it like a string, when '+', it handles it like a number. We're back
> to type juggling here, and using "0." as a string here is just making things
> blurry.
String concatenation is not communtative and it's not associative with
addition.
> Your reasoning has another flaw, for instance: in math '-' & '+' have the
> same precendence, and you're actually saying:
> 2 + 2 - 3 (1)
> should equal
> 3 - 2 + 2 (3)
> or
> 2 - 3 + 2 (1)
> depending on wether you decide the - or the + has precedence.
No, you're saying it. Unless we've entered an alternative universe
where logic doesn't matter, the statement "addition is communtative"
does not imply "substraction is communtative."
[Back to original message]
|