Live data from Hacker News

Why Perl Didn't Win

outspeaking.com

41–50 of 157 posts

Re: Why Perl Didn't Win

#41
post #36

I suspect that all the languages that are "winning" right now will have "lost" 10-20 years from now too. What's the longest lived language out there right now that's actually still in heavy use? I'd say C. But C has clearly fallen from its position of complete dominance when every new project was written in C (because it was much easier than writing assembly). C++ had its day as well and lives on in many places, but…

I agree with your point but not the scare quotes. Yes, the field evolves, priorities change, and languages inevitably fall out of favor. However, that losing is inevitable doesn't make the losing less real, and I think it's still very useful to think about why a language fell out of favor. What changes in priority left the language behind? What could have made it more adaptive? What does that say about current programming trends? In 2020, we may well have a "Why Python Didn't Win" article, and I'll really want to read it.

Re: Why Perl Didn't Win

#42
As a Perl and Modern/PBP fan, I have to suggest that CPAN has become a poorer resource over time:

>In the olden days, you could expect to find a Perl module for most anything you wanted to do

but also:

Having 57 modules all called Sort will not make life easy for anyone (though having 23 called Sort::Quick is only marginally better

and it seems that every time I look for a useful module on CPAN I find myself in a twisty little maze of packages, all different.

TIMTOWTDI, yes, but which one (or several) of the available modules will have a usable combination of convenient utility and mutual compatibility? Over time, CPAN has started to feel like the house of someone who rescues animals, but cannot let go of any of them.

Re: Why Perl Didn't Win

#43

Earlier quoted context omitted.

I was recently asked to add some trivial code to the end of an existing unmaintained Perl script written long ago. Something along the lines of $x = `cat FOO 2>/dev/null`; if ($x == "foo") { system("BAR"); } When I tested it I found BAR was executed no matter what FOO contained without any errors or warnings. WTF? After a little more searching I found the problem was that I should have written $x = `cat FOO 2>/dev/nu…

This sort of distinction exists in other languages though: Java has == and equals. OCaml has = and == etc. (Not that Perl doesn't have its issues; but this is very low in that list imho)

But in those languages, the equivalent to ($x == "foo") will return false (almost) all of the time. The poster here says that this expression is true (almost) all of the time in Perl. Why?

Re: Why Perl Didn't Win

#44
post #4

I have two programming tattoos: a Perl camel and a Ruby ruby. That basically tells the story of why Perl didn't win for me: As soon as I started learning Ruby, I thought, "Oh, a cleaned-up Perl" and never really wrote any Perl code again. I love Perl's personality, its quirkiness, and its massive amount of libraries. Perl was _massively_ influential on me as a young programmer. But I'm pretty sure that I won't be wri…

Exactly. Perl 6 was forever delayed, and along came Ruby. Or rather, out from the shadows came Ruby, which was already there before the Perl 6 debacle, and just needed promotion. The Pragmatic Programmer books were pretty good at pointing to this cool replacement for Perl that you never knew was already there (as well as all the buzz from the RoR folks for those of us who weren't in on the beginning) I don't really t…

I'm wondering if Swift will fill that role, eventually.

Re: Why Perl Didn't Win

#45

Earlier quoted context omitted.

> For the "Enterprise!" developer pool, there's Java. The 500 line methods are still hard to slog through, though. Great straw-man there. I didn't realise that javac required 500 line methods before compilation. > In which case, the language of mandate doesn't matter much. It's a lot easier to pass two collections to a method in Java than to a sub in Perl.

--- Java --- List aList = Arrays.asList( new int [] { 1, 3, 5 }); // probably missing some more type stuff in Map aMap = new HashMap (); aMap.put( "name", "Joe"); aMap.put( "ID", "42"); // I need to check if Java 8 has map literals a la Groovy... doSomething( aList, aMap); ... void doSomething( List aList, Map aMap) { System.out.println( "First: " + aList.get( 0) + ", Name: " + aMap.get( "name") ); } --- Perl --- &do…

I guess that bottom line of what I am trying to say is that not all perl code is unreadable crap. That has more to do with the writer than the language. And, different languages make different things easier.

No final "right" or "wrong" choice for all use cases.

Re: Why Perl Didn't Win

#46
I gave up on perl when I saw the following code:

$x = $src[$src];

I was confused as hell until I realized that arrays and scalars had different namespaces. That, along with the fact that "or" and || had different precedences were what ended Perl for me. I'm not saying that wonderful code can't be written by Perl, it just wasn't the right language for me in that I hate memorizing one-off rules, which Perl seemed to have plenty of, instead of a language that was more internally consistent.

Re: Why Perl Didn't Win

#47

Earlier quoted context omitted.

I was recently asked to add some trivial code to the end of an existing unmaintained Perl script written long ago. Something along the lines of $x = `cat FOO 2>/dev/null`; if ($x == "foo") { system("BAR"); } When I tested it I found BAR was executed no matter what FOO contained without any errors or warnings. WTF? After a little more searching I found the problem was that I should have written $x = `cat FOO 2>/dev/nu…

This sort of distinction exists in other languages though: Java has == and equals. OCaml has = and == etc. (Not that Perl doesn't have its issues; but this is very low in that list imho)

Those languages are far more maintainable and their communities have far more respect for practices which prevent programming errors.

I don't particularly care how many forms of equality or comparison a language has as long as the compiler or runtime is capable of telling me the particular one I'm using is probably wrong. If == can't be used with strings the damn interpreter should tell me so instead of silently and improperly coercing the arguments.

Re: Why Perl Didn't Win

#48

Earlier quoted context omitted.

This sort of distinction exists in other languages though: Java has == and equals. OCaml has = and == etc. (Not that Perl doesn't have its issues; but this is very low in that list imho)

Ahd in Common Lisp, EQ, EQL, EQUAL, and EQUALP. See http://www.nhplace.com/kent/PS/EQUAL.html for an explanation of why.

Mistakes from other languages are still mistakes.

One could try to call them tradeoffs rather than mistakes, but then you'd have to explain why the programmer benefits from such circuitous thinking.

Re: Why Perl Didn't Win

#49
post #36

I suspect that all the languages that are "winning" right now will have "lost" 10-20 years from now too. What's the longest lived language out there right now that's actually still in heavy use? I'd say C. But C has clearly fallen from its position of complete dominance when every new project was written in C (because it was much easier than writing assembly). C++ had its day as well and lives on in many places, but…

I agree with your point but not the scare quotes. Yes, the field evolves, priorities change, and languages inevitably fall out of favor. However, that losing is inevitable doesn't make the losing less real, and I think it's still very useful to think about why a language fell out of favor. What changes in priority left the language behind? What could have made it more adaptive? What does that say about current progra…

>>What changes in priority left the language behind?

I'm not an expert but let me try. The most common of all is abstraction level at which problems are looked increase with time. Once the problems you solve get complicated increasingly over time, you run into a situation where your tools have to provide syntax and semantics to deal with that. While the previous complicated things get trivial and easier to deal with.

There fore your language has to evolve/grow. This is a double edged sword. If you wish to move ahead and break backwards compatibility to do this, you risk fragmenting the whole ecosystem for very little real benefit(Python 2 - 3 problem). You can keep two system in parallel, plan to support the existing for as long as you can while you work on the new stuff(The Perl 6 Problem). Large changes are difficult to make. Or just stay stagnant and become irrelevant(History if full of such languages). Java is rapidly becoming one such language. Its old, trivial things demand too much code and improvements look like bloat.

In the mean while newer languages which have a clean slate to start with come around and stick for a while. Eventually they must face the same problems.

Re: Why Perl Didn't Win

#50
post #44
post #4

Earlier quoted context omitted.

Exactly. Perl 6 was forever delayed, and along came Ruby. Or rather, out from the shadows came Ruby, which was already there before the Perl 6 debacle, and just needed promotion. The Pragmatic Programmer books were pretty good at pointing to this cool replacement for Perl that you never knew was already there (as well as all the buzz from the RoR folks for those of us who weren't in on the beginning) I don't really t…

I'm wondering if Swift will fill that role, eventually.

I hope so. That is, I hope there is a version of Swift outside of Apple-land (Clang compiler for LLVM extension???). What little bit I have seen so far looks promising, and it has a significant sponsor to get the language going.
Post reply on HN