Hacker News new | ask | show | jobs
by leokun 4641 days ago
In what ways is PHP less hassle than Python? I don't understand this argument.
4 comments

Deployment, for one. sudo apt-get install Apache and PHP, then edit the Apache config to say, "use this directory." I love Django and Flask to pieces, but deploying a Python app is like building a hovercraft compared to PHP.
I have no problems deploying a django app with gunicorn. It's a simple command line statement, and deployment is always an intricate thing, unless you don't have to worry about ssl certs and secrets and keys, and managing access, admin pages, etc etc.
Which you usually don't for fun personal projects.
I'm going to say it, better documentation. I don't know, maybe it's just me, but I find it takes me significantly less time do find out how to do something in PHP, or a PHP library than in the corresponding Python. Though, there are obviously exceptions to this.
Ooh, yes. While PHP's docs sometimes promose horrible worst practices, they are more detailed and fleshed out than Python's.
Abstract classes in Python are kinda bolted on http://docs.python.org/2/library/abc.html

They're native to PHP http://php.net/manual/en/language.oop5.abstract.php

Abstract classes are unnecessary and "unpythonic", if you will; there's a lot of other preferred patterns in Python for that use case.
I don't think it's less of a hassle than PHP, but in the context of web development, it is. In PHP, your development environment is often very similar to your production environment.

I think the primary difference is PHP is web first: it was designed to be a language for the web above all. Everything else is tacked on. On the other hand, Python is useful for a whole array of problems and a website is just one problem you can solve with it.