Hacker News new | ask | show | jobs
by cess11 779 days ago
It's a better language. Better performance, better typing, better syntax, and so on.

Build an application in Python, then as soon as it becomes pushed by load you're going to need a rewrite. A few small load balancers and virtual web servers doing PHP can handle tens of thousands of requests per second, the database is almost guaranteed to be the bottleneck.

Python is a (according to some) nicer bash, it's not a good alternative for implementing non-trivial systems and web services.

2 comments

As a longtime PHP developer, my opinion differs from yours regarding PHP vs. Python syntax.

Python took some getting used to, but the more I used it the more strongly I began preferring its lack of things like curly braces, semicolons, even parenthesis in some cases. Because of that, python feels more concise, human-readable, and more efficient to write, than PHP.

I like both languages, and still rely on PHP for a lot of web work, but for data science or ML I do end up enjoying my time with python.

PHP syntax makes it relatively easy to do ad hoc code generation, for example.

Right, Python has a purpose as a glue language.

Python is the world's most popular programming language and a true general-purpose language usable for any application.
Is that meant to be a joke?
It is an undeniable fact, the numbers don't lie.
What numbers? The amount of operating systems and drivers implemented in Python?
Sorry, I'm not keen on measuring excellence by polling web search engines. Is this how you choose what web pages to visit? You grab a top five from somewhere and only use those, except when you drop by here?

I'm more interested in your claim about "usable for any application". How come all those fancy ML types and learned academics refuse to use Python for the core computations they perform when they try to invent witchcrafts, instead opting for C, C++ and Fortran libraries?