NYCPHP Meetup

NYPHP.org

[nycphp-talk] "The Web is broken and it's all your fault."

David Krings ramons at gmx.net
Thu Sep 14 15:58:16 EDT 2006


At 10:38 AM 9/14/2006, you wrote:
>It appears that almost every other language competitively positioned to PHP
>forces discipline a bit more, starting with making one know the expected
>data type(s) at all junctures.

Yes, and for my part that is what drove me nuts in every other language in 
the beginning. When I started with PHP it reminded me of the good 'ol days 
with BASIC on the Commodore 64.
10 A = 1
20 A = "TEXT"
is perfectly legal (not good!) code in C64 Basic. Strip the line numbers 
and add some $ and you have the same for PHP. I started learning C and Java 
and before you can do anything you have to declare half the world. That is 
really annoying for starters. Once I got to the point when I had no clue in 
my scripts what $pointer really is I quikcly realized that setting proper 
initial values saves a lot of trouble and in some cases even code. There 
isn't anything in PHP that stops one from setting data types, but it for 
sure would be nice if PHP could be configured to throw an error for 
mismatches. Some things such as discipline come not from force, but from 
understanding why it is a good thing.

David Krings 




More information about the talk mailing list