I just read Paul Graham's essay Being Popular
and had some thoughts about
it. You probably want to read this article if you're interested in Perl and the
future of languages.
Although he's talking about how Lisp could regain some popularity,
he has some interesting things to say about Perl.
He makes several good points about language popularity (italics mark direct quotes):
- The opinions of expert hackers matter because they're influential.
- To be popular, a language has to be the scripting language of a popular system.
Perl, of course, is the scripting language of Unix and, later, web servers.
- Hackers like languages that let them write brief, expressive programs.
A language designer should act as if it matters how much a programmer has to type.
Perl, of course, cares about this; it's interesting to note that Perl 6
will probably be briefer in some cases (dot instead of arrow,
- Hackers should be able to do whatever they want to do with a language.
Let them get to the "knobs on the back of the set".
Only offer them protection if it makes their jobs easier; don't deny them access.
They may not need this kind of access often, but when they do,
it's essential that they have it.
A good programming language should have features that make people who
use the term "software engineering" shake their heads disapprovingly.
Having just spent some time while writing Class::Prototyped
with package symbol tables, @ISA, %::ISA::CACHE::, etc., I'd have to agree.
I hope that Perl 6 will still allow this kind of access.
- To be attractive to hackers, a language ... has to be good for writing throwaway programs.
Of course, throwaway programs have a tendency to grow up.
To be good for writing throwaway programs, a language has to be available,
interactive, with a command-line interface, and start up fast.
And it should be brief.
- Of course, library functions matter greatly when we're talking about
brevity. Paul makes what I thought was an important point here:
Programming language design will not be about whether to make your language strongly or weakly typed, or object oriented, or functional, or whatever, but about how to design great libraries.
He also says: Perl wins because it has large libraries for manipulating strings.
... Many Perl programs probably begin as just a couple of library calls stuck together.
- Syntax may not matter as much as Lisp apologists think it does.
He says: Perl syntax can be pretty incomprehensible, but that
has not stood in the way of Perl's popularity. If anything it may
have helped foster a Perl cult.
- To have an efficient language and libraries, it's more important
to have a good profiler than it is to, say, make a language strongly typed.
If people can find out what's expensive, they'll fix things.
Maybe we should highlight slow parts of the programs in our editors.
Efficiency will probably matter more as more and more programs
get stuck on application servers.
- The last ingredient a popular language needs is time.
No one wants to write programs in a language that might go away,
as so many programming languages do.
Of course, Perl has gotten past that part of the curve.
It may take Perl 6 a while, though.
- Programming languages, especially, don't get redesigned enough.
He finishes up with a description of the hacker's dream language.
Although Perl fits some points, it has a ways to go in others.
I hope Perl 6 succeeds in those dimensions.
Read the essay; it's worth your time.
update: I asked Paul to make an ASCII version available as well; he put it up at http://www.paulgraham.com/lib/paulgraham/pop.txt