|
Posted by Rik on 05/28/06 17:31
Norman Peelman wrote:
>> We're back
>> to type juggling here, and using "0." as a string here is just making
>> things blurry.
> But allowed in PHP, a loosely typed language giving great flexibility
> to the programmer
I'm not saying it cannot be done, I'm saying that when you're talking about
abstract standards, using this example only makes it harder to see the
logic. The fact that it can be done in PHP saves the programmer a terrible
amount of coding. A blessing in most cases, sometimes an unwanted effect.
>> 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.
> ...there are two levels to the precedence rules and basically stated:
> when
> to operators have equal precedence then left to right rules apply
> unless otherwise noted.
> see:
>
http://us3.php.net/manual/en/language.operators.php#language.operators.precedence
I know, like I stated earlier:
>> Further, it's like any Western language: we read from left to right.
>> If precedence doesn't sort it out, it's processed as you write.
Grtz,
--
Rik Wasmus
[Back to original message]
|