PHP和Python如何侵佔了Perl如此大的份額

gaorongchao1990626發表於2014-03-19

Once in a while someone comes up with a Perl is .... post, and there are always people who point out why their measurement is flawed and how everything is perfect. Yet there are people with mid-career crisis and then others who tell me this was a wake-up call for them and they start learning a more marketable language.

I had part of the following post in a draft for ages now, there is no particular reason to publish it now, but who knows, maybe some people will agree with me.

The numbers show that the market-share of Perl has been shrinking for ages, way below I'd expect. (4% of the JavaScript+PHP+Python+Ruby+Perl market)

There are many reasons for that, let me just point out one that I think is critical.


在很久很久以前,一些人認為Perl就是工作的敲門磚,經常有人指出為什麼Perl是有缺陷的以及一切是如此的完美。
然而,有一些人遇到了職業的中期危機,然後其他人告訴我這是一個警鐘,然後他們開始學習一門更加對路的語言。
我在多年以前就有了一下觀點,並沒有什麼特殊的原因讓我現在發表他們,但是誰知道呢?也許有人會和我有同感。
數字表明,Perl的市場份額已經連年下跌。以我預期的一樣。(4%的JS+PHP+Python+Ruby+Perl 份額)。
原因也許有很多,但是我只指出我認為至關重要的一點。



How did Perl manage to become so successful in the 90's ?

It was the easiest tool around to do sysadmin work and to create dynamic web applications due to its features combining all the power of Unix and due to the availability of CGI.pm in the core.

It was Ubiquitous.

為什麼在90年代,Perl如此盛行?

因為他是最簡單易用的工具,去做系統管理工作,去建立動態Web應用程式,因為他和強大的Unix緊密的結合在一起,也因為CGI.pm的作為核心的可用性。

Perl在那時無處不在。




How did PHP took over leadership for the web?

It was easier for a front-end web developer (HTML) to move from pure HTML to PHP, and a lot of the necessary tools were available without any additional installation. (e.g. access to MySQL)


PHP如何稱為Web界的領頭羊?
一個前端的web 開發人員(HTML)非常容易就會從純HTML轉向PHP的懷抱。無需任何安裝我們就可以使用大量的必備工具。(比如:訪問MySQL)


How did Python become so successful?

Why is Python more and more preferred by people who just need to do some work on a Linux box? Even by system administrators?

Besides being easier to learn than Perl and besides the disgusting socialization of "Perl is bad" I think there is another very important issue.

The default Python distribution comes with a lot of modules in its standard library, that in Perl would require additional installation. Either from CPAN or from the package management system of the operating system.

I know, it is not very difficult to install from CPAN, but it is yet another obstacle, both technically and administratively. A beginner does not know what to install, how to install, and if they are allowed to install at all.


Python為何如此成功?

為什麼Python被越來越多的人作為首選,他們僅僅需要在Linux裡做一些工作?甚至系統管理員也把Python作為首選。
除了比Perl更易學以外,除了在人群中令人不爽的Perl是糟糕的言論。我認為還有一個重要的原因。
在預設的Python標準庫中,附帶了大量的模組。而在Perl中這些模組需要另外安裝。或者從CPAN或者一款作業系統的包管理系統。
我知道,從CPAN中安裝模組並不困難,但是它依然是一個技術上和管理上的阻礙。
一個初學者雖然有許可權去安裝模組,但是卻會迷失在“安裝什麼模組?”,“怎樣安裝模組?”的汪洋大海中。




People will go in the direction of least resistance..


So I think unless a future version of Perl will come with a lot of libraries built in, there won't be an easy way to convince people to pick Perl.

(Oh, and of course it is not the number of libraries what is important, but that they solve the problems people face.)

Having an up-to-date release of DWIM Perl both for Linux and Windows would be a good step in the direction, though I think the real solution would be if theStandard Perl, released by the Perl 5 Porters already included a much larger selection of modules.


世間有很多路,大家總會選擇哪條最好走的!阻力最小的!

所以我認為:除非在未來版本的Perl中內建大量的庫,沒有一種更為簡單的路,讓人重新拾起Perl。
(當然,庫的數量並不是一件多麼重要的事情,但是它確實解決了人們所面對的問題。
在Linux和Windows上提供最新的DWIM Perl是在正確方向上的巨大進步。

儘管我認為真正的解決方案是 在標準Perl中,Perl5的便攜發行版中已經包括了大量的精挑細選的模組。



原文請看:http://bbs.perlchina.org/forum.php?mod=viewthread&tid=71&page=1&extra=#pid338

Perl社群:http://bbs.perlchina.org/forum.php

相關文章