Live data from Hacker News

Why I Use Perl: Reliability

modernperlbooks.com

121–130 of 196 posts

Re: Why I Use Perl: Reliability

#121
post #118
post #117

Earlier quoted context omitted.

The problem is in practice @_ is abused like crazy. For example: 1) I've often seen people shift from @_ half way in the middle of a function. If you really want to be certain about a method's formal parameters you have to read the entire function. 2) Also @_ is used in other circumstances which can cause mass confusion. For example Try::Tiny uses @_. It is difficult to guess if you getting a formal parameter or some…

1) Adopt a convention of extracting your arguments at the beginning of the function. Also, sometimes you just want to work on an arbitrary list of items. If you process one item and then shift it, that's a reasonable thing to do. 2. If you adopted the convention in 1, this shouldn't bite you. (I've never actually encountered this issue myself...) 3. You are misinformed. You can easily do something along the lines of:…

Agreed. There is plenty of awful perl code out there. I have worked on codebases that did things like:

some_func(\%$some_object, \%some_hash);

and used variables like $a and $b as mainline code parameters...

However, if having dangerous features were something to hold against a language in general, nobody would be using C (maybe Linux in such an alternate universe would be written in Fortran or some other abomination). On the whole, I think that well-written Perl is very good. Poorly written Perl is... well, poorly written.

Re: Why I Use Perl: Reliability

#122
post #112

Language keywords: Ruby ~40 Python ~40 Java ~50 Perl ~1800 Perl can have all the community support, packages, and testing that it wants, but I dislike programming in it and find it difficult to code in. This is not because I have only ever done Ruby or Javascript, I would consider my strongest languages to be Objective-C and Java, I have used C quite a lot, I know what I am doing with programming languages. I just di…

A karma 16 account with some fast and wrong insults. It is old enough not to be green colored. Yet another language war troll account on HN. Edit: I'd guess the troll's main account votes the troll posts up... maybe a heuristic can be made for the HN algorithm?

I think it's much more likely that it's just somebody who dislikes a language and stated it in a smartass way, as programmers are wont to do.

Re: Why I Use Perl: Reliability

#123

Language keywords: Ruby ~40 Python ~40 Java ~50 Perl ~1800 Perl can have all the community support, packages, and testing that it wants, but I dislike programming in it and find it difficult to code in. This is not because I have only ever done Ruby or Javascript, I would consider my strongest languages to be Objective-C and Java, I have used C quite a lot, I know what I am doing with programming languages. I just di…

This sounds wrong...so I thought I'd see what Notepad++ has built into its syntax highlighting lexer (langs.model.xml):

  * ~ 35, Python
  * ~ 53, Java
  * ~ 59, Ruby
  * ~189, Bash 
  * ~253, Perl   
Perl has a higher keyword count than Ruby or Python, but remember Perl's keyword list includes its core socket/network library (which Ruby/Python/Java don't contain in theirs...according to Notepad++).

Re: Why I Use Perl: Reliability

#124
post #118
post #117

Earlier quoted context omitted.

The problem is in practice @_ is abused like crazy. For example: 1) I've often seen people shift from @_ half way in the middle of a function. If you really want to be certain about a method's formal parameters you have to read the entire function. 2) Also @_ is used in other circumstances which can cause mass confusion. For example Try::Tiny uses @_. It is difficult to guess if you getting a formal parameter or some…

1) Adopt a convention of extracting your arguments at the beginning of the function. Also, sometimes you just want to work on an arbitrary list of items. If you process one item and then shift it, that's a reasonable thing to do. 2. If you adopted the convention in 1, this shouldn't bite you. (I've never actually encountered this issue myself...) 3. You are misinformed. You can easily do something along the lines of:…

Thanks for the code sample and I like your convention. However, I can't enforce it on other people (especially at work) so it doesn't help me most of the time.

Re: Why I Use Perl: Reliability

#125
Yes Perl is a great language -- stability, maturity, etc. But does anybody realize just how hard it is to find decent Perl programmers? It's not a large community to begin with and the pool of decent programmers is even smaller.

Re: Why I Use Perl: Reliability

#126

For any value of $LANGUAGE, imagine this situation: your boss comes to you and say "Hey, they just released a new major version of $LANGUAGE today. Can you go upgrade it on all our production servers?" What is your emotional response to that request? For many values of $LANGUAGE, there would probably at least some element of terror (for many languages, probably much more than just "some"). But Perl is one where, depe…

For most of my previous employers, if I ever heard... "Hey, they just released a new major version of $LANGUAGE today. Can you go upgrade it on all our production servers?" I'd probably fall out of my chair from shock. Most employers that I've had tend to stick with the version of software that they honed their skills on and were hellbent against upgrading at any cost. (Note: Most of my former employers developed on…

Well, maybe I should have asked what your second response would be after you got over the shock of your employer wanting to upgrade something. :)

Re: Why I Use Perl: Reliability

#127

Yes Perl is a great language -- stability, maturity, etc. But does anybody realize just how hard it is to find decent Perl programmers? It's not a large community to begin with and the pool of decent programmers is even smaller.

Unless you're completely impatient, you can pretty much take anybody with a "scripting" language background and throw them in and it's fine. Works the other way around, too. Python, Ruby, and Perl are all nearly the same language under the hood, with Javascript and Lua somewhat more distant but still not all that different. (Also, I mean someone who knows Javascript, not merely someone who can copy and paste some snippets of jQuery.)

Yeah, they may not know the exact APIs you're using, but that's usually the case anyhow.

What doesn't work so well, or at least takes a lot longer, is to take somebody with only Java, C/C++, or other such languages, and throw them in.

Re: Why I Use Perl: Reliability

#128
post #45

I was about to note that the OP clearly hasn't used Clojure if he uses it as a negative example in terms of reliability, but then I remembered — I promised myself not to get too deeply into these kinds of silly discussions. So, dear OP, good luck writing your large-scale multithreaded high-performance distributed applications using Perl. And BTW, I do use Perl quite a bit and I really like it, for certain tasks. But…

I was about to note that the OP clearly hasn't used Clojure if he uses it as a negative example in terms of reliability, but then I remembered — I promised myself not to get too deeply into these kinds of silly discussions. Erm... He didn't? He said: "While so much of the shiny-chasing buzz in the micro-ISV startup built-it-and-they-will-fund world seems to chase Clojure and Node.js and app-in-a-page tricks, Perl 5 c…

"Lots of folk using it because it's the new-and-shiny rather than it being necessarily the best solution"

How do you know what is in people's head? I assert that lots of folk are using perl because it's comfortable to them rather than it being the best solution.

Re: Why I Use Perl: Reliability

#129
post #66

Earlier quoted context omitted.

Does ruby not have the same level of both?

Check this site out for a comparison of the various module counts per language. It is really incredible that rubygems surpassed CPAN last year and continues to grow at a very rapid rate. Quality may be another matter, but still, impressive. http://www.modulecounts.com/

They're missing a few languages. For instance, Quicklisp.[1]

[1] http://www.quicklisp.org/beta/

Re: Why I Use Perl: Reliability

#130
post #23

The article makes a good point. But, the title (and comments here) infer that there are a mountain of reasons why people don't use it. Is there a compelling argument against that mountain, or is this just a reminder that Ruby/Python/Closure/Scala communities would be well-served to try and improve in this area?

The worst problem with Perl as a language is hiring for a good Perl programmer. It's easy to hire a mediocre Perl programmer, mind you, sometimes even a mediocre programmer who's really good at Perl specifically and knows all the packaging tricks and whatnot so he can get through the interview before falling apart on the job, but really hard to find the good ones. It just doesn't have much mindshare at the moment (ug…

Being usually on the other side of the equation, I found that it's pretty hard for a developer to break into the Perl world. To give a personal example, of the languages that I did when I was doing the whole schooling thing (Perl, Java, VB6), I enjoyed coding in Perl the most. Dont' know what it was, it just "clicked". But because folks that were hiring had no interest in new grads at the time (post dot-com bubble), I had to settle for PHP shops since they were the only one hiring. Even nowadays with years of experience with development (sadly still with PHP mostly), applying to Perl jobs gets the "sorry not interested" reply.

Maybe I need to know Ruby or Python? :D

Post reply on HN