Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Python will probably be easier to write and almost certainly be easier to maintain.

It's possible to write good code with PHP, but a great deal of the example code you'll find online is not good. On top of that, the language itself tends to encourage bad design (see "broken window theory").

Python has a strong culture of having one obvious and good way to do things. In some situations, that can feel restrictive, but it tends to make dealing with code other people wrote easier.



Python has a strong culture of having one obvious and good way to do things.

This is, I think, where people new to Python stumble up. If they were Dutch, the obvious way would be easier to spot.



How do you relate "broken window theory" with the grammar of PHP?


Broken window theory, as it applies to code essentially says that sloppy code begets sloppy code. PHP itself has sloppy design, such as inconsistent argument order and naming conventions for built-in functions.

Most of the complaints I can think of about PHP that are objectively demonstrable are outdated. The language now has namespaces, closures and the like. Most of the complaints I have left have to do with the feel of the language, and some remaining cultural elements; it feels like a ghetto, even though it seems to have modern infrastructure now.


And thus Zak withstood the zackattack...


Don't forget PHP now has goto!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: