http://www.perlmonks.org?node_id=1206051

aartist has asked for the wisdom of the Perl Monks concerning the following question:

Do you use Perl 6 or Perl 5 ? What are the test-cases when a user or group or organization moves adopts Perl 6 ? Thanks.

Replies are listed 'Best First'.
Re: Reasons for Using Perl 6
by stevieb (Canon) on Dec 22, 2017 at 16:37 UTC

    It's not really a "move to" thing. perl6 is a completely different programming language. It's not an updated perl5 in any stretch of the imagination. They are as different as perl5 vs Python for example.

    Personally, I use perl5, but I do dabble a bit periodically with perl6; not enough however to have produced any releases of anything though.

      Hi stevieb,

      while I agree with most of your post (++), I think that this sentence:

      They are as different as perl5 vs Python for example.
      isn't true (or, at the very least, is a gross exaggeration). Yes Perl 5 and Perl 6 are different programming languages, but they share the same philosophy and a lot of the syntax, so they are much closer to each other than any of these two is from Python.

      Despite their differences, learning Perl 6 with a Perl 5 background is very easy, while learning, say, Perl 5 with a Python background takes much more effort and even, in a way, a mental paradigm shift. I can claim that I really know what I am talking about here, since I have gone through these two processes: I was using Python (many years ago) before I took up Perl 5, and, of course, more recently I learned Perl 6.

      Once I learned Perl 5, I essentially gave up coding in Python (except for some legacy code and for a few experiments with Python's new constructs), but the fact that I've learned Perl 6 doesn't mean that I have stopped using Perl 5 in any way, I'm still using Perl 5 more than Perl 6 (notably at $work).

        They share a lot of the syntax except for the cases where the committee decided to make useless incompatible and confusing changes.

        Jenda
        Enoch was right!
        Enjoy the last years of Rome.

Re: Reasons for Using Perl 6
by holli (Abbot) on Dec 22, 2017 at 20:32 UTC
    • Math that works
    • spot-on (unlike Perls "bolted-on") OO system
    • built-in asynchronicity/concurrency
    • outstanding Unicode support
    Just to name few.


    holli

    You can lead your users to water, but alas, you cannot drown them.
      Yes, holli, by all means. I would add grammars.
      • "Math that works" is what? An attempt to circumvent the restrictions of the computer computational model at the expense of making actual computation insanely slow? I guess that might mean it works, but is it useful? Or do you mean something else?
      • And that's a good thing why?
      • Which was one of the reasons the implementation took almost twenty years already and the result is still prohibitively slow.
      • mkay

      Jenda
      Enoch was right!
      Enjoy the last years of Rome.

        Floating-point arithmetic is flawed and sucks, and has sucked for probably 40+ years by now (which is really a very long period when speaking about modern technologies). It is actually outrageous that this hasn't been fixed over such a long period. Experienced programmers know it and have been accustomed to live with that. Does that mean that we should accept this flaw? I don't think so. IMHO, we should get rid of that flaw, we need a flexit.

        Consider this in Python:

        >>> .3 - .2 - .1 -2.7755575615628914e-17
        The result is very small, but it should really be 0.

        It's not better in Perl 5:

        $ perl -E 'say .3 - .2 - .1;' -2.77555756156289e-17
        Of course, neither Python nor Perl 5 is responsible for that, it is the FP arithmetic of the underlying architecture which sucks.

        Does this mean we can't do anything about it? Yes, we can, Perl 6 has this right:

        > say .3 - .2 - .1; 0 > printf "%.50f\n", .3 - .2 - .1; 0.00000000000000000000000000000000000000000000000000
        Getting an accurate result for such a simple calculation is not anecdotal. It is a real and major improvement. You can compare non integers for equality and get the correct result. Don't do that with most other programming languages.

        Yes, this improvement comes with a cost. So long as we have hardware that is inaccurate, we'll need to work around it with software, and this is bound to be somewhat slower. Personally, I think that accuracy is more important than speed.

        If speed was the only criteria, none of us would use Perl, we would all write our programs in C, nay, probably in assembly. But we don't. So, most of the time, speed is not the most important factor for us.

        Well, sometimes, speed matters. And I probably would not argue for accuracy if that meant that computation was really "insanely slow," as you claim. But it is not insanely slow; it is just somewhat slower, as shown in my earlier post above, and this speed issue could just be solved with a faster CPU. And, as I said earlier, there are performance enhancements almost every week (and some very big ones should be there very soon).

        Without wanting to really move you from your strong opinions strongly held about Perl 6, is perf -especially numeric- actually prohibitively slow still? Have you done any numeric work in Perl 6 in say the last six months to a year? I'd gently suggest it's really not that bad anymore. Rational maths is always going to be slower than floating point due to hardware support. Comparing like for like though Im not sure the difference is so big its something that would stop me. At least if I was using something as slow as Perl 5 for numeric work to begin with perf is clearly not what I cared about! For the P6 advent this year I did a bit of a write up on my personal long wait for perf, its really not what it once was https://perl6advent.wordpress.com/2017/12/16/day-16-%F0%9F%8E%B6-deck-the-halls-with-perf-improvements-%F0%9F%8E%B6/
Re: Reasons for Using "Perl6" (don't need to earn a living?)
by 1nickt (Canon) on Dec 22, 2017 at 17:30 UTC

    As far as I know, there are no groups or organizations that have adopted "Perl6" other than hobbyist clubs. It is not a production-ready language, still breaks backwards compatibility with new releases, has a dearth of library extensions for doing real work, and is orders of magnitude slower than using Perl for the things it can do. It's an interesting project that has attracted some very bright minds over the 20 years or so it's been talked about, but it really doesn't have much to do with Perl other than its unfortunate cooption of the name.

    99.99% or so of the discussion in this Monastery is about Perl 5, because that's the actual practical programming language that we mostly all use and love.


    The way forward always starts with a minimal test.
      As far as I know, there are no groups or organizations that have adopted "Perl6" other than hobbyist clubs.
      I guess that's probably correct, although the term "hobbyist clubs" seems a bit deragotary here.
      It is not a production-ready language ...
      Pure prejudiced opinion, at variance with facts
      ... still breaks backwards compatibility with new releases,
      I do not know such case (except for very minor fixes or adaptation to new Unicode standards), perhaps you can enlighten us.
      ... has a dearth of library extensions for doing real work
      Well I agree that the P6 ecosystem is not as rich and as mature as the P5 CPAN, but there are many hundreds of modules for almost everything useful. See https://modules.perl6.org/. And you can use most P5 modules in Perl 6, as well as Python, C and Java libraries (much more easily than it would be in P5).
      ... and is orders of magnitude slower than using Perl for the things it can do...
      You should update your information, that may have been true 3 or 4 years ago, but that's no longer true. P6 might still be slightly slower than P5 for quite a few things (and may be faster for others), but it's certainly not "orders of magnitude" behind in terms of speed.
      but it really doesn't have much to do with Perl
      Not true. These two languages are different programming languages, but they are very close to each other, like brothers and sisters.

      On the issue of the similar names, well, yes, perhaps, it may be unfortunate, things evolved in an unpredicted way. I am afraid it will probably be difficult to change it now.

      To the OP: for the sake of full disclosure, I am the author of one of the Perl 6 books, so I may have my own prejudices. But 1nickt has been known here as a regular staunch opponent to P6, and may have his own. But I guess you discovered by yourself that we disagree on that.

      Update: fixed a couple of minor typos.

        Could you say more about the facts of it being production-ready?

        You acknowledged the ecosystem issue. But isn't that a major part of production-readiness? I just had a look around modules.perl6.org, but it seems not quite CPAN like e.g clicking on any of the modules there takes you to various github pages, so the documentation and other benefits of CPAN aren't there. Is there a plan for it to be more like CPAN?

        If it were production-ready, some team would adopt it for production work. If you consider "there are no groups or organizations that have adopted "Perl6" other than hobbyist clubs" probably correct then you'd probably agree it's not seen as production-ready. Or even close enough to production-ready to start a longer project in hope it's going to get production-ready in time for the project to go to production.

        I've seen several "all behold, I've made Perl 6 quicker" posts here on Perlmonks and while the message to stand in awe of claimed to have made Perl6 several times quicker, it was still at least two magnitudes slower than a matching Perl 5 solution.

        Those two languages are different programming languages, but I would not consider them just siblings. They are more like a person and his atomic-waste-mutated brother with several extra limbs at weird places, odd number of eyes and many extra organs that nobody knows the purpose of.

        Jenda
        Enoch was right!
        Enjoy the last years of Rome.

        Hi esteemed Brother Laurent_R, I don't care to get into a point by point debate with you. I will say only that I base my statements on what I have read with my own eyes in the last 6 - 8 months.

        • Tux announces 10% speed boost in P6 CSV handling, bringing P6 to less than 350 times slower than Perl: August 2017
        • "Zoffix", TPF-funded P6 developer and cheerleader, states: "Tiny ecosystem full of abandoned modules; Slow; Buggy ;Some stuff still gets changed around, so you may need to tweak your code to work on latest-and-greatest version once in a while; No mature modules for common tasks; your options are to roll your own, use works in progress, or use Perl 5's modules via Inline::Perl5 and pray it works." on Reddit, May 2017
        • Official notice of breaking changes on "Perl6" website, April 2017
        • perl.org has had a design change since the summer so I can no longer find the quote but until recently P6 was described there as not production-ready. I've noted it in various posts on the topic. The language on perl.org sites now emphasizes that Perl and P6 are not compatible.

        As I have stated before, I am not an opponent to "Perl6" - my problem is with the hijacking of the name, versioning number, reputation, community and funding of Perl to promote a new experiment. As long as the P6 proponents use that confusion to promote their agenda, I'll continue clarifying to promote mine: the health and longevity of Perl.


        The way forward always starts with a minimal test.
A reply falls below the community's threshold of quality. You may see it by logging in.