On Sat, Jul 27, 2013 at 11:48 AM, Jeroen De Dauw jeroendedauw@gmail.comwrote:
Hey,
Python has its nice things, and is generally considered more hip then php. So are languages such as Ruby. Its true there are some stupid things in php, such as inconsistencies in the base library, and the dozen lines needed to do a map and a filter (vs one in python) in a readable way. If one looks at the bigger picture, those are not deal breakers though. Creating well crafted code is definitely possible in PHP. Unfortunately PHP is one of those languages (as is JavaScript) where most participators do not really know what they are doing. Copying some JS around and kicking it into the shape you like, or writing a plugin for wordpress do not qualify one as a good developer. So I think people that have the "You cannot do nice things in PHP as the language is broken, in Python its so much nicer" attitude are rather short sighted (or just trolling). (And I'm not implying OP has this attitude.) Those who create messes in PHP are going to do the same thing in Python.
To answer the question if python is better then PHP for website dev: it depends on the situation. Do you have a legacy system in PHP and a team of people familiar with PHP, then go with PHP. If you have never done Python, and want to start a toy project, go play with Python.
Everything said here. In lots of cases, you can pick the tool you feel most comfortable with because for all practical purposes it won't matter at all. That being said, there's some things that each language may excel at, so picking the right tool for the task at hand is important.
And no matter the tool, you can always write bad code and look like a fool; that is language independent ;-)
-Chad