PHP Everywhere 贴出一篇《Python never had a chance against PHP》的文章,这并不是在对 Python 进行挑衅,而是较为客观地对 PHP 和 Python 进行分析,认为在 Web 应用方面,Python 比不上 PHP:
- Python is not a template language, in the sense that you cannot mix code and html easily. PHP is a wonderfully flexible in this respect.
- Python is a so-so string processing language. One reason being it treats strings as immutable. PHP has much better string processing facilities: embedded "$var in strings", mutable strings, auto-conversion of other data types to strings, output buffering, etc.
- PHP's documentation is cleaner and much easier to understand than Python's. Probably because PHP is a much simpler language.
- PHP has tighter integration of a lot of web related stuff. For example, HTTP and SERVER variables.
对于各种语言,我的观点从来都是:存在即是合理的,每个语言都有其应用的空间。就对于 Python 而言,在 Web 方面不如 PHP,但其在通用编程方面功能却要比 PHP 强大得多。而现在流行 Web 编程,所以 PHP 这方面的优势也就决定了增长势头要比 Python 猛得多。
(more…)