Live data from Hacker News

Why Perl Didn't Win

outspeaking.com

131–140 of 187 posts

Re: Why Perl Didn't Win

#131

[probably shameless plug] I first intended to write this as an answer, but I ended up with a complete blog post: http://programming.tudorconstantin.com/2015/01/perl-already-...

Watch out for whoever says that Perl is an ancient technology, because they're either ignorant and completely clueless about what's really happening in the world of computer programming, or they have hidden agendas. That's a strong statement. Are you quite sure those are the only two possibilities?

There's this Perl book called Modern Perl. It is written to help others learn about the new technologies available to Perl world. Do you know about the book? oh, you wrote it :) So yeah, if they don't have hidden agendas and they say that writing Perl apps means writing apps in an old fashion, the only possible alternative is to be ignorant :)

Re: Why Perl Didn't Win

#132

Earlier quoted context omitted.

Watch out for whoever says that Perl is an ancient technology, because they're either ignorant and completely clueless about what's really happening in the world of computer programming, or they have hidden agendas. That's a strong statement. Are you quite sure those are the only two possibilities?

There's this Perl book called Modern Perl. It is written to help others learn about the new technologies available to Perl world. Do you know about the book? oh, you wrote it :) So yeah, if they don't have hidden agendas and they say that writing Perl apps means writing apps in an old fashion, the only possible alternative is to be ignorant :)

I think Perl didn't win. I don't know the specific context of Romania, but from where I sit, it's unlikely I'll get paid to program in it in the foreseeable future, if ever.

What's my hidden agenda in agreeing with this article over yours?

Re: Why Perl Didn't Win

#133
post #19

Rewriting your language, like any other piece of software, is a great way to lose your market position: http://www.joelonsoftware.com/articles/fog0000000069.html

I mostly agree with Joel there. It's worth pointing out that if doing a from-scratch rewrite of your end-user app is a bad idea, then doing a from-scratch rewrite of your platform that will force all of your users to do from-scratch rewrites of their apps must be orders of magnitude worse.

Re: Why Perl Didn't Win

#134
post #61

Earlier quoted context omitted.

> Can one even use CPAN with Perl6? Is it even possible to convert existing Perl5 CPAN packages to support both versions at the same time (like all of the PyPI packages that support both Python2 and Python3)? Respectively: Not at all, and not without major contortions. The languages have diverged a lot ; even basic tasks like defining a function are not the same.

Respectively: https://github.com/rakudo-p5/v5 While not quite the same as what was asked, it's clear that 'not at all' is not an informed answer

That module's neat, but CPAN is still out of reach. For one, a lot of important modules in CPAN contain XS components, which don't carry over. Additionally, a lot of the modules that don't use XS are likely to be using unusual features of Perl5 which aren't fully emulated by that shim.

Re: Why Perl Didn't Win

#135
post #71
post #20

You know what rocked? Perl 4. I started on Perl 4 in the mid-1990s. It was fantastic! I started replacing thousand-line C programs with hundred-line Perl programs that were more robust and worked better, and replacing shell scripts made of awkward sed/awk pipelines with neat, tight Perl. Arrays and hashes as first class data structures? Marvelous! Then Perl 5 ruined it all. The ridiculous, bloated "object oriented" s…

Absolutely right - Perl 4 had a clear niche (text processing, UNIX system scripting etc) and did this very well. Perl 5 added so much cruft and ugly syntax on top of this in an attempt to try to become more 'general purpose' that it lost its focus. At this point it became easier to switch to Python for 'real' programming. There are still a lot of problems in the Perl 4 space and to be honest I wish that distributions…

It would be rather pointless to ship Perl4, as Perl5 is almost completely backwards compatible with Perl4. Most of the parts where backwards compatibility was removed weren't actually used to a large extent. Also Perl5 didn't add that much syntax, and a big reason it was ugly is that Perl4 didn't leave a lot of space for the extra features. Which is also why Perl6 breaks backwards compatibility.

There are also some features that were eventually removed from Perl5, but not really. For example setting $[ was removed (it was a pretty stupid idea), but if you try to use it Perl loads the module arybase which re-implements that feature. (removing it simplified the internals)

Re: Why Perl Didn't Win

#136
post #71
post #20

You know what rocked? Perl 4. I started on Perl 4 in the mid-1990s. It was fantastic! I started replacing thousand-line C programs with hundred-line Perl programs that were more robust and worked better, and replacing shell scripts made of awkward sed/awk pipelines with neat, tight Perl. Arrays and hashes as first class data structures? Marvelous! Then Perl 5 ruined it all. The ridiculous, bloated "object oriented" s…

Absolutely right - Perl 4 had a clear niche (text processing, UNIX system scripting etc) and did this very well. Perl 5 added so much cruft and ugly syntax on top of this in an attempt to try to become more 'general purpose' that it lost its focus. At this point it became easier to switch to Python for 'real' programming. There are still a lot of problems in the Perl 4 space and to be honest I wish that distributions…

If you seriously think that Perl5 is less suitable for text processing than Perl4 was, I suspect you haven't actually used the language in a while... it's still perfectly good for that. Perhaps even better, since 5.8 added extensive support for Unicode (without requiring explicit conversions and breaking everything like Python 3 did).

Re: Why Perl Didn't Win

#137

Earlier quoted context omitted.

Is there an actively maintained fork of Perl 4 (or earlier) somewhere? Sounds like there should be.

There's really not much point. Perl 5 is 99% backwards compatible with Perl 4, so if you think Perl 4 was great, just use the Perl 5 compiler (but none of the new features).

Perl5 even still supports some of the really ugly features of Perl4 that people generally wish would go away (like &function_calls, and nested'packages'like'this.)

Re: Why Perl Didn't Win

#138

Earlier quoted context omitted.

There's this Perl book called Modern Perl. It is written to help others learn about the new technologies available to Perl world. Do you know about the book? oh, you wrote it :) So yeah, if they don't have hidden agendas and they say that writing Perl apps means writing apps in an old fashion, the only possible alternative is to be ignorant :)

I think Perl didn't win. I don't know the specific context of Romania, but from where I sit, it's unlikely I'll get paid to program in it in the foreseeable future, if ever. What's my hidden agenda in agreeing with this article over yours?

The article has valid points. Hidden agenda is when people say that writing Perl is equivalent to using ancient technologies, solely because Perl had its popularity peak in the nineties - and this might also be a reason why you can't be paid for doing Perl - who would want legacy technologies in their stack?

It's just that, well, it isn't legacy. It's more up to date and much more robust than many of the hip languages.

Re: Why Perl Didn't Win

#139
post #6

Earlier quoted context omitted.

While you may end up being right, Perl6 is a much larger departure from Perl5 (than Python3 is from Python2). Can one even use CPAN with Perl6? Is it even possible to convert existing Perl5 CPAN packages to support both versions at the same time (like all of the PyPI packages that support both Python2 and Python3)?

> Can one even use CPAN with Perl6? Is it even possible to convert existing Perl5 CPAN packages to support both versions at the same time (like all of the PyPI packages that support both Python2 and Python3)? Respectively: Not at all, and not without major contortions. The languages have diverged a lot ; even basic tasks like defining a function are not the same.

> Not at all [can one use CPAN]

You are mistaken. See my nearby comment about Inline::Perl5.

> not without major contortions [can one convert].

One doesn't need to convert (due to Inline::Perl5).

That said there can be valid reasons (eg having fun and learning Perl 6) to want to convert existing Perl 5 code to a Perl 6 equivalent anyway. While some partial P5-to-P6 conversion tools already exist[1] (and I'd be surprised if more don't arrive in the future[2]), conversion of a well written Perl 5 module in to a well written Perl 6 module is mostly a manual exercise.[3]

> even basic tasks like defining a function are not the same.

    sub foo ($foo, @bar) {
       my $qux;
       # do something
       return $qux
    }
This is the same in both languages.

Could you provide some code to illustrate what you mean?

---

[1] http://www.perlito.org/perlito/perlito5to6.html Incomplete but better than nothing.

[2] https://github.com/rakudo-p5/v5/ is a project to create a Perl 5 compiler written in Perl 6. It parses Perl 5 code and spits out Perl 6 ASTs. It's obviously not a huge jump for it to spit out straight Perl 6 code. One day...

[3] http://jnthn.github.io/css-tiny-presentation/presentation/#/

Re: Why Perl Didn't Win

#140
post #61

Earlier quoted context omitted.

Respectively: https://github.com/rakudo-p5/v5 While not quite the same as what was asked, it's clear that 'not at all' is not an informed answer

That module's neat, but CPAN is still out of reach. For one, a lot of important modules in CPAN contain XS components, which don't carry over. Additionally, a lot of the modules that don't use XS are likely to be using unusual features of Perl5 which aren't fully emulated by that shim.

As its now been pointed out more than once, 'not at all' is not true. I did not claim it could use everything available on CPAN, but was pointing out that you were making a false statement based on, well, i'm not sure what you based your statement on but it was made in such a matter-of-factly way that it needed to be corrected.
Post reply on HN