NYCPHP Meetup

NYPHP.org

[nycphp-talk] Why do "cool kids" choose PHP to build websites instead of Java

David Krings ramons at gmx.net
Sat Jan 12 09:43:03 EST 2008


Elliotte Harold wrote:
> Anthony Wlodarski wrote:
>> Zesty Ping never learned === apparently.  This one's for you Zesty:
>>
>> http://www.php.net/manual/en/language.operators.comparison.php
>>
>> "===" introduced type facing in php4 so it is a moot point or just 
>> poor reading skills on some developers parts if they missed this 
>> essential comparison operator...
>>
> 
> That's a bug, not a feature. Adding multiple equality operators makes 
> the whole language still more complex and confusing and full of special 
> cases one has to remember. It adds yet another way for programmers to 
> enbug their programs. Adding an operator with correct semantics is only 
> a solution if you remove the broken one at the same time.
> 

And doing so will break 99.999% of all PHP scripts currently in use. That is 
crap that Microsoft pulls off, but others are a bit more careful with the 
changes that they implement. I think this is one way to do it and if PHP's 
masterminds would have decided to do it differently some folks would jump up 
and down about that as well. Just look at Commodore BASIC V2, it only knows 
the = doing all three things of =, ==, and === in PHP depending on context. 
For example, writing
IF A = 10
doesn't do a value assignment, but since it is in an IF clause it is always a 
comparison. In regards to IF really the only thing that makes sense, otherwise 
the condition is always true and you won't need the IF. But all modern 
languages do it that way and that is equally dumb. And it is pretty difficult 
to make a language to be dumber than Commodore BASIC V2.

No matter how something is done it always has disadvantages. And in reagrds to 
PHP the disadvantages are acceptable compared to other supposedly better 
programming languages. Just look at the language we use to have this 
discussion. Most of English doesn't make any sense at all. Why is natrium 
called sodium in English? Why is repipe pronounced differently than recipe? 
Why is every greek or latin name mispronounced in English? Why is there no 
reliable set of rules for use of commata in English? Based on your arguments, 
we should all start speaking Latin, which is known for its rigid rules and 
very very few exceptions, which is the main reason why it is taught in 
schools. Teaches how to follow a strict rule set and is a very nice tool to 
learn how to learn complex things.

David



More information about the talk mailing list