TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Why PHP is better than Python

9 点作者 maus80超过 10 年前

7 条评论

ytimoschenko超过 10 年前
You are completely missing the point.<p>The first problem is: reasons you&#x27;ve listed are stereotypical rants that young PHP developers say. Reasons #2 #4 #7 #9 are just false. For templating here you are: <a href="http://tornado.readthedocs.org/en/latest/template.html" rel="nofollow">http:&#x2F;&#x2F;tornado.readthedocs.org&#x2F;en&#x2F;latest&#x2F;template.html</a>, the others you could find yourself. Moreover, reasons #3 #6 just don&#x27;t matter (who cares about quantity of books on PHP? Do you need to read them all? Functions beginning from _ not being imported is not enough for your encapsulation needs?), and #5 #8 are completely subjective. Please don&#x27;t say any more of that.<p>The second problem is: you don&#x27;t understand that language is just a tool to solve your problem. You should find a suitable tool for your problem, not vice versa. While it is definitely easier to build classical websites (no websockets) in PHP, you won&#x27;t be able to write a system daemon or SMTP server or a concurrent messaging server in PHP.<p>You shouldn&#x27;t concentrate on one tool, it is slowing you down. Python is great when it comes to science: <a href="https://wiki.python.org/moin/NumericAndScientific" rel="nofollow">https:&#x2F;&#x2F;wiki.python.org&#x2F;moin&#x2F;NumericAndScientific</a>, you won&#x27;t find this number of scientific packages anywhere but in Python. It also, in my opinion, is much better suited for API servers than PHP with its perfect Flask <a href="http://flask.pocoo.org" rel="nofollow">http:&#x2F;&#x2F;flask.pocoo.org</a> and creepy but pretty fast Tornado <a href="http://www.tornadoweb.org/en/stable/" rel="nofollow">http:&#x2F;&#x2F;www.tornadoweb.org&#x2F;en&#x2F;stable&#x2F;</a>.<p>There are dozens of languages that everyone should use in their specific domain. Erlang for stable concurrency systems, Go for productive network and system programming, PHP for building simple websites, Python and Julia for scientific applications, Lua for embedding, Perl for parsing and scripts, Clojure for general-purpose language with immutable structures and concurrency, Haskell for learning great new ideas.<p>Programmer should be able to program on everything, that&#x27;s the difference between a programmer and just a person who needs a website.
评论 #8711351 未加载
thibauts超过 10 年前
&gt; 4. Python is hardly used in the real world, while something as big as Facebook is built on PHP.<p>Google used to run a lot of python and it&#x27;s probably still the case. Youtube is built almost exclusively on python. Among many others.
评论 #8711272 未加载
codygman超过 10 年前
No one is responding to this because it isn&#x27;t worth responding to. PHP&#x27;s libraries are a mess and while the documentation is pretty nice, it&#x27;s not nice enough to make up for the other problems.
评论 #8711260 未加载
omouse超过 10 年前
This top 10 list isn&#x27;t very good, it seems like something written back in 2006 or 2007. Shared hosting? Forget that, buy a VPS or EC2 and host it yourself.<p>The only reason I would use PHP now is if the Hack language is being used and everything is reviewed for coding style.
emergentcypher超过 10 年前
This list is ridiculous. I question whether the author has any idea what he&#x27;s talking about.<p><pre><code> Python isn&#x27;t used in the real world? </code></pre> EVE Online begs to differ.<p><pre><code> PHP behaves as expected </code></pre> ...ahahahahaha.
tarminian超过 10 年前
So, PHP is better because Python sucks? That is how I read their list. Also, I get lots of spam from leasweb ip blocks. Guess php is better for sending spam.
svisser超过 10 年前
Writing an &quot;X is better than Y&quot; post often indicates immaturity.
评论 #8711355 未加载