Live data from Hacker News

Why Perl?

bits.shutterstock.com

21–30 of 118 posts

Re: Why Perl?

#21
post #20

This is really just a checklist that can be applied to any language. So yes, why not Perl after all...

There are lots of great languages. I think we can learn from each other. Perl has a lot of problems but also a lot of strengths. CPAN is one of its strengths. Compare CPAN: https://metacpan.org/module/Moose::Manual Then compare with other repositories from other languages: http://stackoverflow.com/questions/1693529/list-of-top-repos... CPAN does * Documentation * Historical versions of libraries * Search * Source cod…

Sure but 99% of what I want is something that A. Has a library I want and B. can install it easily.

All those bells and whistles are nice. But they're not something I'm basing my technology stack on because most of the time theyre not something I need.

Re: Why Perl?

#22
post #3

The author originally posted this article on his blog a few days before this one. If you ignore the trolling then there are some interesting comments on what Perl offers today: http://jjnapiorkowski.typepad.com/modern-perl/2011/10/why-pe...

Thanks. That one also doesn't require JS ("Why not JS"?).

(Call me old-fashioned)

Re: Why Perl?

#23

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

Also, Ruby's lack of @ $ % is great. And the fact that it has a single object model, not falling to the Paradox of Choice[1] makes it a great alternative to Perl.

And what is best: I've never seen anyone that loved Perl not enjoy Ruby. They both have very similar ideologies, but Ruby stands on the shoulders of Perl, Smalltalk and Lisp. Therefore it could see farther.

[1] http://en.wikipedia.org/wiki/The_Paradox_of_Choice:_Why_More...

Re: Why Perl?

#25
post #6

Earlier quoted context omitted.

indeed, or pypi, or PEAR, and I'm sure ruby has something similar too

All of those have a long way to go yet to match the CPAN ecosystem . See my reply above.

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 managed to pick the one that give incorrect results...

of course in Python it's just built-in, as are sockets, http, smtp, imap...

Re: Why Perl?

#26
post #20

This is really just a checklist that can be applied to any language. So yes, why not Perl after all...

There are lots of great languages. I think we can learn from each other. Perl has a lot of problems but also a lot of strengths. CPAN is one of its strengths. Compare CPAN: https://metacpan.org/module/Moose::Manual Then compare with other repositories from other languages: http://stackoverflow.com/questions/1693529/list-of-top-repos... CPAN does * Documentation * Historical versions of libraries * Search * Source cod…

And also there is:

* CPAN Forum - http://cpanforum.com/

* Annotated CPAN - http://www.annocpan.org/

* Discussion/review on pre CPAN modules - http://prepan.org/

Re: Why Perl?

#27

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

Also, Ruby's lack of @ $ % is great. And the fact that it has a single object model, not falling to the Paradox of Choice[1] makes it a great alternative to Perl. And what is best: I've never seen anyone that loved Perl not enjoy Ruby. They both have very similar ideologies, but Ruby stands on the shoulders of Perl, Smalltalk and Lisp. Therefore it could see farther. [1] http://en.wikipedia.org/wiki/The_Paradox_of_Ch…

"In Ruby, ordinary variables lack sigils, but "$" is prefixed to global variables, "@" is prefixed to instance variables, and "@@" is prefixed to class variables."[0]

Okay, I don't know Ruby well enough to know if these are commonly used features, but the statement that there are no sigils is false.

[0] http://en.wikipedia.org/wiki/Sigil_(computer_programming)#La...

Re: Why Perl?

#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 (actually i'm all for letting Perl die except for little scripts less then 100 loc):

Perl Programmers love their language:

Me (and colleagues) had to use Perl for some projects and i can't say i love the language at all. I understand it, i can write it and i am constantly underwhelmed, disappointed and sometimes disgusted. The point is that Perl is sort of a zombie in many businesses and runs often enough that it can't be ignored and often enough has to be maintained.

True Freedom:

Probably yes, but "and often can find the core developers in charge of some code" really doesn't apply anymore.. i browsed a lot through CPAN and a huge part of modules hasn't been touched for years (i can't count how many modules i've seen from 2001).

Great Community:

I certainly wouldn't bash a whole community, it sure may be great, but when searching online you get the feeling it died years ago (most posts are ooooold). perlmonks.org is often a good resource, but beyond that... the IRC channels i know are more idle then other languages (by far).

CPAN:

True, a big selling point for Perl is the huge amount of libraries on CPAN. But it's really untrue to say "there is nothing like it" (PIP for example).. Same point as above, a big amount of CPAN seems to be not maintained anymore, there are many modules with unsolved bugs.. just a few examples of widely used modules that haven't been updated for years and have open bugs:

  Config::Simple https://rt.cpan.org/Public/Dist/Display.html?Name=Config-Simple
  XML::Simple https://rt.cpan.org/Public/Dist/Display.html?Name=XML-Simple 
  HTML::Parser https://rt.cpan.org/Public/Dist/Display.html?Name=HTML-Parser (atleast active)
And i just went through search.cpan.org hit some "buzzwords" and checked the results, there is a BIG amount of modules nobody looked at for years. I'm not saying that there is no development at all, but often enough i think "mhh, should i even use this module? Nobody seems to care about this anymore". Certainly the most important libraries are actively maintained for sure, no doubt about that!

Awesome Tools:

Yes sure.. Moose is a good example of what's wrong.. it's trying to bring object system to a language that wasn't even remotely designed to support modern language features. Not to bash Moose, i like Moose, it's good! But it tries to solve a problem that shouldn't be there in the first place.

Another creepy example:

Want to have exceptions in Perl? Turns out the language doesn't have them.. There are modules.. all of them do some black magic trying to emulate this. The number one google hit (Error.pm) even states "Using the "Error" module is no longer recommended due to the black-magical nature of its syntactic sugar, which often tends to break.". And this is not some fancy 2011 language feature, it still isn't built in! What's also not built in? Perl thinks it's ok when you read an uninitialized variable. Want the script to terminate when this happens? You'll have to implement and change signal handlers and take care of it yourself when other modules try the same... ugh.. Want to know if an element is in an array? There are some hideous for loops you could do, but nothing like "if X in Y".. best thing: Most recommended way to do this is to convert your array to a hash/dictionary and check for the key.. that's basic array handling.. I could go on with this list for weeks but i fear this is already too long of a text..

Jobs:

Yes, where i live it doesn't matter. As IT guy it's unbelievable easy to get a job, that has nothing to do with the language. At least where i live.

My criticism on Perl:

- Perl lacks basic language features of a modern language (Exceptions, Array Handling, Error Handling, Unicode Support is horrible and so much more)

- In general Perl code from different programmers looks very different, because basic things can be done equally "well". This and a hideous syntax leads to really hard to read code unless you know every way a Perl program can be written (and i'm sure not even Larry Wall knows that)

My fun fact on Perl:

- Did you know that Parrot (the Perl6 VM) won't have a Perl5 interpreter because it's next to impossible to craft a 100% perl5 compatible parser.. at least they gave up early.

I've had the highest WTF-count while reviewing other peoples code by far(i may at one day put my prime example on thedailywtf.com).

Now this will get me a massive downvote, but this is my Perl experience. I can only beg people:

When your script/tool exceeds 100 lines of code, don't use Perl! Atleast not if there is the remote possibility of another human being having to understand or maintain it. Please!

[edited for some paragraphs, but well... not as readable as i'd like it to be, sorry!]

Re: Why Perl?

#29
post #25

Earlier quoted context omitted.

All of those have a long way to go yet to match the CPAN ecosystem . See my reply above.

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 version did work on your system: http://www.cpantesters.org/distro/M/Moose.html#Moose-2.0205

> I managed to pick the one that give incorrect results...

That's why there is a review system:

http://cpanratings.perl.org/dist/Email-Send http://cpanratings.perl.org/dist/Email-Sender

Re: Why Perl?

#30
post #5
post #4

Earlier quoted context omitted.

Honestly, the only point there that applies to any language is the "freedom" one. The rest are, with varying margins, real differentiators. Especially the CPAN ecosystem one. No other language has that.

What are the differences between CPAN and, for instance, Maven repositories?

[deleted]
Post reply on HN