Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Perl Popularity

by kal (Hermit)
on Dec 16, 2003 at 21:20 UTC ( #315145=perlmeditation: print w/replies, xml ) Need Help??

Okay, so programming isn't about popularity contests. And people have remarked before about Perl's popularity: in particular, why some people detest it so, claim all Perl code is bad (and then blame the language for that), etc. What's new?

I'm currently kind of worried about system support for Perl. Not right now, but in the future. It seems that Perl is slowly seeping out of things. The latest masterpiece - the one that has triggered my current thoughts on this subject - comes from the nascent UserLinux list, where someone who probably isn't very well known says Python and PHP should be supported in this new distro, and a few other languages be available for stuff that needs them. Seriously - PHP, wtf? Did I miss something? (this isn't meant as a slight to the poster, nor his other beliefs ;)

I don't understand the unPerl thing. I have a good knowledge of Perl, have programmed web applications, scripts, and various other bits and pieces in it. I know exactly how wonderful the language is, and how programming other systems is like sitting on nails. I just can't see how you might not love it. But then, I'm only human.

What will it take for people to stop welching on the language? Does this even matter? Actually, there are two or three things that strike me:

  • The jump between CGI and mod_perl is massive. There is no PHP-alike. There is no simple Perl for writing webby things with sessions (etc.) support in by default. Is that so hard? Loads of people get free PHP hosting with their ISP, hence lots of people play with PHP. Getting Perl hosting is slightly more difficult for CGI, lots more difficult for mod_perl. There has to be a middle way.
  • Perl has manic Gnome2 support. With Glade, this could be a very cool RAD system. Not many people appear to even know it exists. This is crazy.
  • CGI::Application, Template::Toolkit, Class::DBI::Pg, Apache::PAR - is this not nirvana?! I'm almost afraid to bring these modules together lest they reach critical "cool" mass and suck everything good out of the world into a black hole of amazing. See also previous comment on simple web systems.

I apologise for sounding somewhat ranty, but I just don't understand why people don't see this. It's not like there isn't enough information about good Perl code: PerlMonks, useperl, perladvent.org, etc. etc. Not so much a meditation, this is obsessing my mind currently. Do other people see a marketing problem here? Or do other languages hide similar gems? (Don't tell me PHP does, I won't believe you ;P )

You see, I don't really care about popularity. But I do care about acceptance. It should be okay to program in Perl. In fact, it should be downright cool. But it seems like that's not the case, and that Perl acceptance is getting a bit tougher these days...

Replies are listed 'Best First'.
Re: Perl Popularity
by adrianh (Chancellor) on Dec 16, 2003 at 22:26 UTC
    It seems that Perl is slowly seeping out of things

    I have to admit I've not really noticed much of a downturn. More support for Python and friends, but not less support for Perl. Since I like diversity I can only view this as a good thing.

    I don't understand the unPerl thing. I have a good knowledge of Perl, have programmed web applications, scripts, and various other bits and pieces in it. I know exactly how wonderful the language is, and how programming other systems is like sitting on nails. I just can't see how you might not love it. But then, I'm only human.

    Different languages have different advantages and disadvantages. Languages change. That's why Perl 6 is coming along after all :-) In fact if I was the sort of developer to worry about languages "taking over" from Perl it wouldn't be Python and PHP I would be worrying about, but Ruby - since it fits into Perl's little evolutionary niche much more easily than Python and PHP do.

    The jump between CGI and mod_perl is massive. There is no PHP-alike. There is no simple Perl for writing webby things with sessions (etc.) support in by default. Is that so hard? Loads of people get free PHP hosting with their ISP, hence lots of people play with PHP. Getting Perl hosting is slightly more difficult for CGI, lots more difficult for mod_perl. There has to be a middle way

    PHP web hosting is easier because, well, PHP hosting is easier for the ISP :-) PHP works very well in virtual hosting environments with multiple sites that cannot trust each others code. It's hard, if not impossible, to do this with mod_perl 1. mod_perl 2 solves most, if not all, of these problems so hopefully things will get better once mod_perl 2 starts getting out in the real world a bit.

    Perl has manic Gnome2 support. With Glade, this could be a very cool RAD system. Not many people appear to even know it exists. This is crazy.

    Crazy? Possibly. Possibly not. Maybe most Perl developers don't want/need to write Gnome2 applications? Maybe most people who want to write Gnome2 applications are already more familiar with other languages? Maybe there is equally good Gnome2 development support in other languages too?

    CGI::Application, Template::Toolkit, Class::DBI::Pg, Apache::PAR - is this not nirvana?!

    They are indeed all great. However you'll be able to find a templating system, an object/relational layer, and a packaging system in most languages. Maybe not with the same set of bells and whistles, but not everybody needs the same set of bells and whistles.

    I apologise for sounding somewhat ranty, but I just don't understand why people don't see this. It's not like there isn't enough information about good Perl code: PerlMonks, useperl, perladvent.org, etc. etc.

    Perl's perception problems (IMHO) are not so much due to the lack of examples of good Perl code, but the surfeit of bad.

    For every single eToys there are fifty Matt's Script Archive's.

    Perl's popularity means that a lot of code has been written by people who haven't got a very tight grip of the clue stick. The same flexibility that allows you to write small, powerful, elegant and comprehensible code in Perl also allows people to write unintelligable line noise.

    And of course there are also the things that Perl does not do so well... I know I'm looking forward to Larry's A12 so I can finally see what a vaguely decent OO layer will be like in Perl!

    Or do other languages hide similar gems? (Don't tell me PHP does, I won't believe you ;P )

    As I said earlier - it's much easier for an ISP to setup, install and admister PHP safely for multiple untrustworthy virtual hosts. Not what many people consider a primary language point - but in my opinion it is what's pushed PHP into the limelight.

    Believe me :-)

    And yes, other languages have great features too. Java has much better code sandboxing than Perl. Ruby has excellent OO support and a funky distributed code environment built into the core. Smalltalk has great continuation based web environments. .Net has a cross-language virtual machine. Prolog is fantastic for constraint-based code. Etc.

    Not that I don't like Perl. Because I do. It's the language I've coded the most in for the last few years. Perl's a fantastic language and I fight Perl FUD wherever I find it. However, their are other great languages out there. There are also not-so-great languages that are better solutions in certain environments.

    You see, I don't really care about popularity. But I do care about acceptance. It should be okay to program in Perl. In fact, it should be downright cool. But it seems like that's not the case, and that Perl acceptance is getting a bit tougher these days...

    As I said at the start, I've not seen Perl acceptance get any worse over the years. The opposite if anything. What has happened is that other "scripting" languages like Python, Ruby, Curl, PHP, etc. are begining to make an impact too. The more the merrier I say :-)

      Downturn.. don't know. I suspect it's being used less and less. I probably wouldn't be able to prove that, though, since I doubt the figures are being collected. Claims about it being the most popular web programming language are fairly unbelievable though (Programming Web Services with Perl, O'Reilly).

      As for PHP being easier for an ISP - yes, I totally utterly agree. I kind of alluded to it. I would be interested to know what you think in mod_perl 2 solves this issue though: I've not seen anything about that. mod_perl has a rep for being very difficult to program, and my experience with it goes along with that.

      When I was talking about the Gnome2 situation being crazy; what I meant was this: Perl has these great Gnome2 bindings. But, I don't see any Gnome2 apps being written in Perl. I totally don't believe someone would want to write a Gnome2 app in C rather than Perl. There must be other reasons why people don't find it appealing. I just can't put my finger on it... other than, it feels culturally 'wrong'. I think distribution has been a problem (i.e., getting people to install the modules), but PAR solves that. But then, I've not really seen that used in anger either.

      PHP I have the hardest time with. It's horrible. The language is foul, and PHP-GTK is clearly evil. In terms of right tool for right job, PHP is just wrong for scripting and apps. It's not even that it's easier to learn than Perl either; because I don't believe it is (maybe the sigils disrupt things slightly...I don't know). For all the crack in Perl 5, there are an awful lot of warts on PHP.

      I completely agree about the bad code thing. I recently helped someone having a problem with a Perl CGI script, and it was failing because it couldn't find cgi-lib.pl to require it. This script was first written in 2001, and last touched this year. Nasty code will be written in any language. However, examples of good code don't really seem to abound :/

Re: Perl Popularity
by dragonchild (Archbishop) on Dec 17, 2003 at 02:57 UTC
    It seems that Perl is slowly seeping out of things.

    ...Perl acceptance is getting a bit tougher these days...

    I don't know about anyone else, but I have had absolutely no problems getting (mostly) pure Perl jobs, even in this crappy economy, in very large and very small companies. MasterCard, Motorola, Verizon, BankOne - they all have extremely large Perl codebases. Although I have no direct experience of this, former coworkers of mine speak of huge Perl/Sybase codebases in the NY trading houses.

    Also, Perl is not the be-all-end-all of programming languages, just as Linux is not the be-all-end-all of operating systems. Although I am an open-source junkie, Win32 systems have a huge number of advantages, as does VB(A) as a programming language. If it wasn't for the untiring efforts of thousands of developers, Linux would have more bugs that Windows. (Frankly, many Linux apps do have more bugs than the corresponding Win32 apps. For the enterprise, I will still recommend MS Office over OpenOffice. I use it, but I'm a power user. Most people aren't.)

    Power user - that is the important phrase in the above statement. Perl applications development on Unix/Linux is approaching the position that VisualC++ has on the Win32 system. For the standard user, PHP / VBA are good enough. My father, a banker, once told me that he didn't need more than that for what he was doing. I offered to help him out, giving me a Perl/MySQL solution, but he declined. He didn't want a Cadillac when a bike would get him by.

    Perl development is, when done right, a Cadillac. You can RAD all you want, but to deploy something for the enterprise, you need an expert. Case in point - I just got hired on at a small company that's been trying to transform itself into a web-prescence. They had a number of very sharp people doing their development, but they were green in the ways of Perl/Apache. It takes someone who's seen it done before to make a web-prescence happen.

    Contrast that to PHP (or VB) - a novice can put something up with one of those 21 Days books and it looks good! Sometimes, it looks better than what I can do with Perl. Now, can Perl do stuff PHP can't even dream of? Well, duh! VC++ is the same when compared to VB. But, they don't solve the same problem. Perl solves the problems that nothing else can solve. If something else can solve a problem better / faster / easier than Perl, then use it! To be a language-nazi is to be a fool. Languages are just tools. What you're saying is that you only want to use your specific super-duper-powertool. Well, what if the power goes out? Or, you don't have the 110-to-220 converter? Or, you just want to change a light bulb. My father just wanted to change a light bulb, so why should he have to go get his power-saw from the garage? A simple butterknife would do.

    ------
    We are the carpenters and bricklayers of the Information Age.

    Please remember that I'm crufty and crochety. All opinions are purely mine and all code is untested, unless otherwise specified.

      Although I have no direct experience of this, former coworkers of mine speak of huge Perl/Sybase codebases in the NY trading houses.
      I can confirm this. I know of one brokerage house/bank that has a department devoted to perl support within the company, let alone perl development...

      I feel that a lot of people, especially newer perl users, equate perl with web development. That's really quite a narrow view - perl is much bigger than just web apps. In particular it is incredibly well suited to all sorts of data migration jobs, data warehousing, etc.

      Michael

        I feel that a lot of people, especially newer perl users, equate perl with web development. That's really quite a narrow view - perl is much bigger than just web apps. In particular it is incredibly well suited to all sorts of data migration jobs, data warehousing, etc.

        I couldn't agree more, I use Perl everyday and I don't do any web development. I use it for application servers, data processing, lots of database work ...etc.

        sth

Re: Perl Popularity
by Aragorn (Curate) on Dec 17, 2003 at 09:05 UTC
    I think you're focusing a little too much on the whole Web thing. Perl got a boost with the popularity of the Web, but was already in wide use as a sysadmin tool (it's more than 15 years old). And I believe that most Perl stuff is not out in the open, but doing its work quietly to keep lots of things going without "public knowledge".

    PHP on the other hands, was meant as a Web application language from the beginning. So it's perfectly logical that things made with PHP have higher visibility. Also, I think it's a matter of the right thing on the right time. PHP was there as a relatively simple and specialized tool for creating dynamic websites just when it became feasible for "normal" people to host a website with a hosting provider. Add that to the fact that it's easier for hosting providers to support PHP than it is to support Perl it's not really strange that PHP got a bit more attention as a Web development language.

    Again, it's a matter of perception. PHP is used in a visible way, but Perl is used in a lot more things than just building websites. As for other languages like Python and Ruby, I think it's only good to have diversity and hence, cross-pollination. And once you know a scripting language, it isn't that hard to learn the other. Maybe the syntax is different (whitespace is significant, which isn't as hard to get used to as most people think) and the focus lies somewhere else (in Ruby everything is an object).

    Like languages adapt and grow, try to adapt and grow on a personal and professional level.

    Arjen

Re: Perl Popularity
by xenchu (Friar) on Dec 16, 2003 at 23:48 UTC

    Perhaps this will make you feel a bit better about Perl popularity. The university where I work is part of a consortium of schools that purchased a certain brand of web software.

    One of the things the consortium had to decide on was a common programming language. I don't know if they were offered a list of choices or everyone submitted their favorite language. Either way, when the votes were tallied, Perl had won.

    How that compares to world popularity, I have no way of knowing. It seems, though, that Perl is not going to wither away just yet.

    xenchu


    The Needs of the World and my Talents run parallel to infinity.
Re: Perl Popularity
by Abigail-II (Bishop) on Dec 16, 2003 at 23:55 UTC
    Seriously - PHP, wtf? Did I miss something?

    Or do other languages hide similar gems? (Don't tell me PHP does, I won't believe you ;P )

    Why complain that Perl isn't getting the attention you think it should be getting, if you yourself are eager to bad-mouth other languages.

    Abigail

      If you read carefully, I'm not bad-mouthing other languages. Other language. Specific. PHP. I'm not slagging Python, Ruby, or any other of the interpretive bretheren (although I admit to not liking them - Python's whitespace in particular is a deal breaker). PHP at a basic level is a similar language to Perl. PHP has emerged from a specific problem domain, and is now being thought of as a general purpose scripting language. My thoughts on PHP mirror RMS' thoughts on TCL - it seems to be a pointless diversion. If people think PHP is easier to learn than Perl, I think they're wrong. However, that can't be happening through critical analysis, because apart from the specific case of code-in-web-page, Perl wins over PHP. Something else is causing people to think PHP is more suitable for work than Perl, to the extent they discuss it as above.

        If people think PHP is easier to learn than Perl, I think they're wrong.

        I think they're right. Pick through a copy of the Camel and see how many times they write something like "but be careful not to do x, because that actually does y, and the Earth will crash into the sun". PHP is derived from Perl, but avoids a lot of the shortcuts Perl implemented, so there is less for a new programmer to learn. However, this minefield of shortcuts is what makes Perl so nice to program in once you figure it all out.

        Additionally, PHP supports a lot of core functionality that is good for web programming. For instance, although I consider PHP's database layer to be broken, the fact is that it's in the core. The same can't be said for Perl's DBI. Likewise, Perl's CGI.pm is a beast of a module, even if all you really need is param(), header(), and maybe cookie(). PHP web programming tutorials cover those things in their first few chapters, but how many CGI/Perl tutorials out there are still teaching you to parse params by hand?

        ----
        I wanted to explore how Perl's closures can be manipulated, and ended up creating an object system by accident.
        -- Schemer

        : () { :|:& };:

        Note: All code is untested, unless otherwise stated

      Because it's fun bad mouthing other languages, duh.
Re: Perl Popularity
by flyingmoose (Priest) on Dec 17, 2003 at 14:56 UTC

    It seems Perl is popular among people that use it. This seems obvious, but well, Perl gets stuff done quickly and there is a certain art to Perl that makes it more fun than coding in other languages.

    There seems to be a recent trend to peddle Python instead of Perl in certain communities (Slashdot), but Python still lacks the analog of CPAN and can't do quite as much (yet).

    I find in general the folks that ask for "readability" simply haven't tried to grok Perl, and are somehow afraid of it. I think the rigid standards enforced by Java and Python are more of chains, the job of discipline is in the programmer. It would be quite a shame if the "hand holding" languages won out. Python's motto of "There should only be one (clear) way to do it", for instance. That's robotic. If everyone adopted this, then we would truly be just grunt I.T. workers. The science in computer science would be lost. Sadly, most corporate programmers were somehow brainwashed into these thoughts, and I choke every time I hear the same tired "Perl is executable line noise" crap. They simply don't know how to write good code, and they need a language that restrains them!

    Embrace the art.

      The science in computer science would be lost.

      It was never there. Computer "Science" is an offshoot of mathmatics, which does things a little differently from hard science. There might be some scientific experimentation done in CS, but most of it is closer to math.

      ----
      I wanted to explore how Perl's closures can be manipulated, and ended up creating an object system by accident.
      -- Schemer

      : () { :|:& };:

      Note: All code is untested, unless otherwise stated

Re: Perl Popularity
by talexb (Canon) on Dec 17, 2003 at 15:06 UTC

    As an earlier poster mentioned, Perl is not only used for CGI and mod_perl. In the last few months, I have used it to write a great installation script, a test script to try out web caching, and a cron job that watches for new documents to be added to a database table (submitted by a PHP front end) and calls another script to submit the new documents to a document processing engine.

    There's some web-related stuff in there, but none of it is CGI stuff. And the PHP front end that I mentioned? Written by a marketing guy who can muddle through using PHP but really isn't up to coding a CGI in Perl. That's OK -- PHP has its place, just like any other tool in the developer's toolbox.

    And I guess that's my point -- Perl is a multi-function tool. It was used for systems administration tasks for years before the web came along and clever folks figured it out that it could be used to do CGI programming. I picked up Perl as a useful tool five and a half years ago and still feel amazed and very lucky that I continue to find work developing in Perl.

    I'm not that big on cool -- I prefer something that works. I'm not into the Tool of the Month club. Enterprise Java Beans sounds like a cool thing to have on your resume, but I'm confident that I can use Perl (with CPAN's riches) to solve lots of different problems. And if folks don't think it's cool, that's fine. I'll just do my job and go home at the end of the day and drink beer.

    --t. alex
    Life is short: get busy!
Re: Perl Popularity
by petesmiley (Friar) on Dec 17, 2003 at 16:20 UTC
    This rant sounds a bit neurotic to me. As for popularity, who cares. I once knew a guy who thought programming everything in LISP was the way to do things. I can't fault him for it, he was getting things done. If anything it raised my opinions of languages like LISP.

    You want people to like Perl. Then use it. Use it a lot. Do good things with it. People will see, even if they don't know how to program. They'll ask you what you used and you'll tell them.

    smiles

Re: Perl Popularity
by perrin (Chancellor) on Dec 17, 2003 at 16:59 UTC
    There is a PHP-alike. Actually several: Apache::ASP, Mason, Embperl. I find Apache::ASP to be the most transparent for newbies. Installation is not trivial though, and that's a difference that is hard to overcome.
      ++perrin

      Apache::ASP rocks!

      It's not really that had to install. Several distributions have working versions of Apache 2 and mod_perl as prebuilt packages, and installing is just a matter of using CPAN:

      perl -MCPAN -e shell # install Apache::ASP

      And a few config file lines.

      For anyone who hasn't tried Apache::ASP, it's worth the install.

Re: Perl Popularity
by pg (Canon) on Dec 17, 2003 at 17:02 UTC

    One of Perlís strongest selling point was web application, especially CGI. Perl was an early starter and obviously easily gained dominant position. Now once other languages started to challenge Perl and put pressure on Perl, it is very normal to see Perl lose portion of its pie.

    Everything faces challenges, just like everybody faces. The invention of J2EEís MVC model made people quickly realized that pure CGI is not a very good architecture, but after a while, now people realized that J2EE is way too slow.

    I have part of my own web server written in Perl CGI, part in Java MVC model. I have to tell you that Perl CGI is way faster, but less maintainable.

    But Perl is a general tool that supports rapid development very well, so I donít think its lost in one area will lead to the fading away of the language itself.

      I don't understand the maintainability bit, since CGI isn't an architecture and MVC isn't a protocol! What prevents you from doing MVC in a Perl program that speaks CGI to the web server?

        Exactly. What I did is to have my Perl web server talk to Tomcat, which then controls all my Java Servlet. They appear fit with each other very well. One of my plan is to have a meditation to share this with everyone.

Re: Perl Popularity
by zentara (Archbishop) on Dec 17, 2003 at 17:43 UTC
    My observation of PHP, is that the people who use it, don't know what they are doing and just want some canned scripts. And I'm already starting to notice the "homogenous appearance" of alot of PHP websites, and to me that makes me think the web programmer just slapped it together. Perl is good enough for me, FastCGI gives my plain old Perl CGI scripts a good boost, if I need it. I think the current situation with remote web servers is just a "temporary hassle", eventually there is going to be high speed access into every location...CHEAP. Then we will all be free to do what we want, instead of being forced to use the server setup of the Provider.

    As far as PHP having all sorts of cool web gimmicks to display on your page, I don't care for it. I like simple interfaces, alot of those PHP sites give me the feeling of "glittering plastic". And if you ask most of those "PHP Wizards" to change something they don't know where to begin. Perl is far more valuable than PHP will ever be.

      My observation of PHP, is that the people who use it, don't know what they are doing and just want some canned scripts.

      That's quite a generalization. I program in both Perl and PHP -- Perl at home, for freelancing, and at work for primarily systems scripts that require text processing; PHP at work for web applications.

      The decision to use PHP for web applications was made before I came, but I feel the reasons were sound: rapid prototyping; ability to create robust applications quickly and easily after prototyping; good and fast database abstraction layer (via PEAR); many programmers available should we need to outsource; and more.

      As for me, I like the fact that to add a session to a PHP script, I simply start it with 'session_start()'; accessing POST, GET, COOKIE, and SESSION variables is intuitive and fairly secure (if you program correctly); and sometimes it's just so much easier to embed the HTML into the script (though I try and avoid that -- I like to separate content from layout).

      I like perl for its robustness, and its extensibility -- I cannot do anonymous routines in PHP, for instance, which often bothers me, and I'll NEVER do any sort of systems or networking work with PHP -- and how easy it is to separate HTML from the scripted backend (HTML::Template and Template::Toolkit are excellent tools). But it's also easy for me to write code that others have trouble debugging; not so in PHP (whether or not that's a bonus is another question altogether).

      Perl and PHP are both excellent tools; use each where they make sense.

Re: Perl Popularity
by Steve_p (Priest) on Dec 19, 2003 at 14:28 UTC

    I'm sorry I've come into this discussion late, but being a frequent poster and follower of the UserLinux mailing list, I needed to comment here. The original poster here is incorrect. If he had followed the discussions a bit further, he would have found that Perl is a required part of the Debian core, and, therefore, required for UserLinux.

    Now, for a bit about UserLinux. UserLinux is not necessarily a distinct distribution. It will be based on Debian and use Debian packages. What it is about is choices. UserLinux is making choices about what packages are needed for a base corporate installation. When corporate network administrators see

    [steve@gandalf /usr/bin]$ ls | wc -l 2472

    they get really nervous. This will be improved by UserLinux. However, if someone needs or wants a package not in the base install, they can simply do an apt-get and download it.

    Now onto the Perl question. The choice to promote Python over Perl had been mentioned above. I have seen very little Gnome 2 programming done with Perl. Python, on the other hand, is used extensively as a GUI programming languange by several Linux distributions. On Fedora, for example, the supplied GUI configuration tools are all written in Python. Python is also quicker to learn, which is a selling point for the PHBs. Since the focus of the distribution is to provide a easy to use, GUI-based environment that is easy to migrate users to, Python makes more sense to promote as a language to achieve that goal.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlmeditation [id://315145]
Approved by coreolyn
Front-paged by broquaint
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (3)
As of 2021-05-09 08:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Perl 7 will be out ...





    Results (100 votes). Check out past polls.

    Notices?