Reply to Re: Butt ugly

Your name:

Reply:


Posted by Chung Leong on 05/27/06 21:46

Rik wrote:
> 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. Type juggle
> necessary for the last operations stands. It seems very logical to me. What
> can make it confusing, is the fact that the string contains characters that
> could be operators. That could throw you of, just because you expect
> something that you know since you were 6.

That's sort of my point. Precedence should determine the outcome
instead the order of the operators. Giving operators that are
fundamentally different the same precedence is confusing, because
people tend to group operations they consider similiar together in
their mind. Can you imagine how confusing it would be if + and == has
the same precdence? Quickly, what's the result of the following:

2 + 2 == 1 + 3

> Let's say $text = "2 + 2 = " or " = 2 + 2"
>
> echo 2 + 2 . $text;
> echo $text . 2 + 2;
>
> It just makes sense to me....

Well, it didn't make sense to the other Rik ;-)

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация