Python array syntax in PHP

David M. Wilson dw-google.com at botanicus.net
Thu Nov 13 06:53:26 EST 2003


Dave Benjamin <ramen at lackingtalent.com> wrote in message news:<slrnbr5seo.k6d.ramen at lackingtalent.com>...

> There was a recent proposal on the PHP-DEV list to add a syntax similar to
> Python's for arrays (in PHP, arrays serve as both lists and dictionaries,
> though usually not at the same time. ;) Though several of the language
> developers were marginally positive about the idea, I found it interesting
> how much of a controversy ensued.

I find it interesting that the lead arguments against the syntax are
that of "there shouldn't be more than one way of doing things", and
"this is an unnecessary change", coming from a development team who
recently added iterators to their language after it had gone into
beta.

I promised myself that I would write an HTML hate-rant on PHP for my
web site. I'll get around to it someday. Roughly, the conclusion would
be:

a) Don't ever touch PHP.

b) Don't ever mention your PHP 'skills' or experience on your CV or to
your friends. Rest assured someone will find a steaming pile of crap
for you to work on.

c) If you are handed an existing PHP project to work on, rewrite in
another (say 'any other') language immediately. Don't port, you will
only carry the satanic anti-structure of the PHP application with you.

Rewrite all related documentation, schemas, and concepts. Don't spare
a single byte - you won't be free of the curse until all the children
are dead..

d) Time and cost are no exception to c). If this argument is proposed,
dispel it with: "how much time and cost will be involved in keeping
this application maintained, and running on future PHP releases?" 
Shoot to kill if they don't accept this.

Follow these simple steps and you will find true peace. :)


David.




More information about the Python-list mailing list