| ethanthescribe ( @ 2008-07-11 16:59:00 |
PHP vs Python
I've been spending a bit of time playing with Python, and comparing its main contender (IMHO) PHP.
This is still early on in the evaluation process, but so far:
In conclusion (so far) I think PHP is the better language for web pages, and Python is better for general purpose programming.
PHP has the fastest load time of any of the web app languages I've tried, by several orders of magnitude in some cases. This is important for web stuff.
Delphi whips them both for sheer productivity and ease of use, but is not cross platform (and commercial to boot, although there are free 'Personal' version out there)
I've been spending a bit of time playing with Python, and comparing its main contender (IMHO) PHP.
This is still early on in the evaluation process, but so far:
| Feature | Python | PHP | Preferred |
| Apache Integration | Haven't really done much with this so far. | Has html templating built in, integrates very nicely. | PHP |
| Structure | Uses indenting to show block levels... I don't like being told how to indent my code, but I'm coming to see how it could work. | Uses standard C braces like almost every other language out there. I'm used to it, I like it, reduces learning curve. | PHP |
| Libraries | Has a huge array of libraries to do all sorts of things | Has a huge array of libraries to do all sorts of things | About even |
| Debugging | Python comes with an integrated debugger, and an workable IDE of sorts | Doesn't have an IDE, (although has many, many 3rd party editors et al) and I've never got the debugger to work in windows | Python |
| Cross Platform | Works on pretty much any platform out there | Works on pretty much any platform out there | About even |
| Modules | Has a well integrated system of organising modules, and sensible use of namespaces | Has a flat namespace... thus all function names have to be unique. Classes take some of the sting out | Python |
| Error Checking | Not bad | Not bad, once you learn how to turn it on properly. | Python by a smidge, but then neither come close to Delphi |
| Documentation | Good, centralised online documentation | Good, centralised online documentation. PHP is better organized and has way more examples. | PHP |
| List Handling | Has lists and dictionaries, seems to have powerful manipulation functions | Arrays can be mapped or indexed, and have powerful list manipulation commands. | About even, but I think I prefer the PHP approach. |
| Speed | Reasonably fast for a scripted language. | Very fast to load, and pretty damn snappy to run. | PHP |
In conclusion (so far) I think PHP is the better language for web pages, and Python is better for general purpose programming.
PHP has the fastest load time of any of the web app languages I've tried, by several orders of magnitude in some cases. This is important for web stuff.
Delphi whips them both for sheer productivity and ease of use, but is not cross platform (and commercial to boot, although there are free 'Personal' version out there)