Live data from Hacker News

Why Perl?

bits.shutterstock.com

31–40 of 118 posts

Re: Why Perl?

#31
It can be very revealing how people feel about a programming language after they stop using it for new projects. Some people can't quite give it up, others fondly send flowers once a year, and some people piss on the grave.

I do think people often wind themselves up when they're breaking up with something - could be a personal relationship, a hobby, a programming language - anything that required a lot of devotion. I think we do this to justify the decision and overcome the dissonance we feel (ie., we overstate the problems we have experienced as a way of overcoming the pain of leaving), so it's especially impressive when people still look back on a programming language with affection. Perl seems to be one of those languages.

Java gets a lot of scorn from people who once used it and have moved on. I personally look back on the days of servlets, jsp, and jdbc fairly positively - I do remember sometimes looking at the screen and realizing that my fingers were going to spend a few days typing something that I'd already thought out, but it all made sense and I felt like I could do anything. I didn't start hating java until configuration hell arrived. Then, I wanted out.

Re: Why Perl?

#32
post #17

The thing I admire most about Perl is that the libraries written for it tend to be more complete than what I've seen in other, similar languages. I think this is due to its age. This may not seem important, but when you need a complete implementation of something you'll likely find it in a Perl library before you will in a Python or Ruby library... just my experience.

Age is not the real reason. Perl was first released in 1987, while Python was released in 1991, Tcl in 1990, and Ruby in 1995.

I believe that Perl's success is due to the fact that it was written to scratch an itch. Larry Wall didn't care much about making a pretty language. He cared about creating a useful language. To this end, it was picked up quickly by Unix junkies everywhere.

The other big issue, that's often overlooked, is the Perl community itself. People working on Perl are really passionate about it. Spend some time reading the perl5-porters (p5p) archives, and you'll see for yourself.

Re: Why Perl?

#33
A few years ago I did a lot of Perl work. Since I do interactive multimedia, I wanted to try my hand at game programming (Frozen Bubble is written in Perl, it couldn't be that hard, right?). At the time, however, the only graphics libraries were extremely limited, which forced me to work in different languages.

Recently, a new awesome SDL library has been created: http://sdl.perl.org/ that actually supports drawing lines on the screen! It's really tempting to make some perl games again.

Right now I'm using the Effect Engine which has a perl backend. It's wonderfully written and straightforward. Many of the "simple" things it does would have been a lot more complicated had they been written using other popular languages. The library support also means that extending anything is easy as pie.

Re: Why Perl?

#34
Perl is my first choice go-to language, but I'm not finding the CPAN advantage as big as it used to be. Increasingly I'm having to use languages I don't prefer (not out of any hostility, just not as comfortable in them) because they have libraries that CPAN either doesn't include, or doesn't include with the same polish/functionality. For example, there doesn't seem to be anything in the Perl world as good as the Python Imaging Library (PIL); PerlMagick is featureful but not very fun to use. The data-visualization libraries are also way behind Python's matplotlib. NLP is a closer call, but overall I find NLTK better integrated and maintained than the stuff in CPAN, though CPAN does have modules for most things you might want to do. I'm currently using Perl for some simple GIS stuff, and the GIS packages also are pretty hit-or-miss.

Admittedly I might just not be good at finding the right packages. Python seems to have more of a culture of headline projects, which register their own domain names, like NLTK, PIL, numpy, etc., while Perl mostly has a big pile of CPAN modules, which range from excellent and actively maintained, to a script someone once wrote that's incomplete and hasn't been touched in 12 years.

Re: Why Perl?

#35
post #25

Earlier quoted context omitted.

and as a user of packages, rather than a package developer, I care about precisely none of that functionality. I want this package installed (plus its dependencies), and I want it now, that's all. I'm not sure I buy that (paraphrased) "Perl is good because CPAN has billions more packages than other language's repos" either, for one I remember trying to find a library that did SHA1 digests, there were three, and I man…

As a user of dists all that stuff is extremely important to you for two reasons: For one, it means the dists are of higher quality because authors have better tools at their hands and get poked to increase quality. For the other, as a user you can tell whether the dist works on your particular system without even installing it and if it doesn't, you can easily find out on what system it DOES work, or which previous v…

I guess understanding why purely language bound code (which most likely accounts for 95% of the packaged code out there), e.g. an object system, would need testing across the cartesian product of all versions, all OSes and all archs, is beyond me...

I guess when you have a language that doesn't have a specification, you require things like this...

Re: Why Perl?

#36

Perl was the first language I loved, and I'll always love it, but I'm sticking with ruby. No more my $self = shift

>>No more my $self = shift

E.g.:

  use Method::Signatures::Simple;

  method get_file_sizes(@files) {
    # ...
  }

Re: Why Perl?

#37
post #28

This is my view on Perl after coding occasionally with it for 2-3 years. For the last 6+ months i've been coding Perl 8 hours per day. In general i'd consider myself at least average in those languages (meaning this list includes my favorite language(s) and ones that i came across for projects and never looked back): C, C++, Java, Javascript, Python, Groovy, Visual Basic, C#, PHP. To be honest i don't agree at all (a…

Not sure why you're being downvoted. Your points are valid.

Re: Why Perl?

#38
post #15
post #8

Earlier quoted context omitted.

Hmm let's see. "Perl Programmers love their language." Sadly not true enough for many languages. Does PHP programmers love their language like Perl programmers do for example? Somehow I doubt it. "True Freedom" Perl is free and open source and most code is too. How does that compare to Java or the microsoft stack? "Great Community" There are a lot of great communities surrounding most languages to be sure, but it's a…

Sadly not true enough for many languages. But I think equally true for the languages considered its successors: Ruby and Python.

From what I've seen of at least Python, it can't really touch CPAN (yet?). It is not the same width of neither modules nor infrastructure (CPAN Testers, etc.).

And the lack of code blocks irritates the life out of me. But I get why it is a common education language, like Pascal in its days.

Edit: Mithaldu wrote this up well.

Re: Why Perl?

#39

Perl is my first choice go-to language, but I'm not finding the CPAN advantage as big as it used to be. Increasingly I'm having to use languages I don't prefer (not out of any hostility, just not as comfortable in them) because they have libraries that CPAN either doesn't include, or doesn't include with the same polish/functionality. For example, there doesn't seem to be anything in the Perl world as good as the Pyt…

Have you tried Imager[1]? It's what I'd recommend these days, but I don't have experience with image manipulation in any other language so I can't compare.

I agree that there need to be better ways to find modules. I have high hopes for MetaCPAN in this regard.

[1] https://metacpan.org/release/Imager

Re: Why Perl?

#40

One of the main points that caught my eye while reading this was the fact that the author mentioned that Perl programmers love their language. As a Perl hacker, I couldn't agree more, and that's the main point I guess. Sure, CPAN is awesome (there is even a module for controlling USB rocket launchers - http://search.cpan.org/~pen/Device-USB-MissileLauncher-Rocke... ) and everything is open source, but the thing I lov…

I think this issue is where a lot of the schism comes from - not everyone's thoughts translate well into perl.

I've tried to "get" perl a few times, and I also get tasked with maintaining legacy perl code from time to time. Perl is the only language I can't readily use without a few books and perldoc.perl.org handy. It just doesn't fit my brain - yet I can jump around in other languages with little trouble.

Maybe it's just me, but I imagine that there's others that have a similar dissonance with the language.

Post reply on HN