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

Over PHP? Basically anything. Hell, I'd use Python before I touched PHP or let anyone install it on any of my machines, and after years of using Python at work I despise it (sorry people who love Python).


I'm somewhat curious to ask "why" (and full disclosure I am indeed a koolaid-drinking python fan) because I could find myself agreeing if you had said the slightly different "I despise it <for certain classes of work>"

E.g. I found myself regretting writing a 20k LOC hobby product in python, it rapidly became so much more of a hairball to grow than a strongly typed or statically compiled language (and part of me wonders how much that's because I haven't learned type hints yet); however you'll pry python from my cold dead hands before I take another language for data analysis/prototyping.


We have the exact same issue with python. For large projects the dynamic typing is such a hassle. It slows down development. It increases debugging time. It's just a pain for complex systems. I haven't used type hinting yet but it only fixes so much of the problem.


We're veering offtopic now, but my problems with Python (in no particular order, some are serious, others are just nits that are annoying but don't really discourage it that much):

- Too dynamic: deliberately hand-wavy but, as you said things quickly become a hairball. No where I've been has been disciplined enough to keep Python projects clean, but they shouldn't have to be. - Dependency management: pipenv has made fetching dependencies a bit better, but it's so slow that it's almost unbearable to use (for even a small repo it has to download and execute setup.py from deps one at a time because the underlying system doesn't provide a decent way to calculate a dependency graph up front, it's aweful). - Testing: I don't know why exactly, but every single place I've ever been has had large chunks of tests that do nothing because mocks accidentally got substituted in for the thing being tested. Maybe this is just part of "too dynamic". - Deploys: I miss the days of single binaries. Workarounds like using containers just for the sake of having a single artifact that can be pushed to prod are solutions for a problem that shouldn't exist. That being said, single binaries seem to be in vogue again, so maybe those days will come again soon. There are certainly worse things here than Python, but still, it's been a major pain point at all places I've been previously. - Significant whitespace: I know this one is controversial and in theory is just a minor annoyance, but again, everywhere I've ever been we've had some sort of major issue where it turned out that something wasn't indented as much as someone thought it was and it was missed in code review. Curly braces may be ugly, but at least they're explicit. - The Python 2/3 split. 'nuf said. People acknowledge that this was a mistake, everyone else learned from it and it's becoming less of a problem over time (but not quick enough).

No language is perfect, but I can't think of a single problem that I wouldn't pick something else over (unless its a choice between Python and PHP, then I'll take PHP any day).

On a more positive note, I always miss context managers when working in other languages that don't have a similar concept.

EDIT: Sorry about the list formatting.


You would choose anything, anything at all. Curious are you an active developer?


Yes, basically anything. And yes, I'm an active developer who has been forced to use PHP plenty of times. Don't do it. Just stop it. Every time you use PHP, even newer varieties, you are making the world of software a worse place.


What language are you using daily?


Mostly Go these days, still a bit of Python and Clojure and on rare occasions a bit of Rust (although those aren't really daily anymore).




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

Search: