http://qs321.pair.com?node_id=1212722


in reply to Re: Curious about Perl's strengths in 2018
in thread Curious about Perl's strengths in 2018

Since I mentioned one-liners, I will say that this is definitely one area where Perl outshines Python. Python technically can do one-liners but it's really not at all as capable as Perl would be in the same setting. Python's regular expression library is very good but it's annoying to write little scripts whenever you need to use it in the context in question. I used sed for the last instance where I needed a one-liner but sed isn't Turing-complete (that I know ofif it is, not in any way I want to use). awk is Turing-complete but much less capable than Perl otherwise.

  • Comment on Re^2: Curious about Perl's strengths in 2018

Replies are listed 'Best First'.
Re^3: Curious about Perl's strengths in 2018
by LanX (Cardinal) on Apr 12, 2018 at 08:21 UTC
    Yep, I like to compare Perl to an old song "I'm every woman it's all in me".

    It combines most aspects of bash, lisp and C.*

    Unfortunately it's badly managed, in the early 2000 it should have invaded the ecosystem of Bash and respond to the DSL needs of Ruby folks and incorporate a fast OOP system a la Moo

    That's probably the downside of having a very tolerant user base and giving a say to everyone.

    Pythonistas are in my experience not that tolerant, I had numerous encounters where they kept mobbing other languages and in the end it turned out I even knew their "own" language better.

    Cheers Rolf
    (addicted to the Perl Programming Language and ☆☆☆☆ :)
    Wikisyntax for the Monastery

    *) and heavily influenced other now main stream languages like PHP, JS and Ruby. Especially the latter is mostly Perl with "nicer" syntax and OO system.

    Roughly Ruby := Perl - Bash + Smalltalk

    ) in retrospective

    ) Chaka not Whitney

      AFAIK Smalltalk was the biggest influence on the design of Ruby.

        Quoting Matz from An Interview with the creator of Ruby (2001):

        I wanted a scripting language that was more powerful than Perl, and more object-oriented than Python. What bits of Perl did you incorporate in Ruby? A lot. Ruby's class library is an object-oriented reorganization of Perl functionality--plus some Smalltalk and Lisp stuff. I used too much I guess. I shouldn't have inherited $_, $&, and the other, ugly style variables. How about Python? What aspects of that language did you try to reuse in Ruby? Far less than Perl. But I stole a few things, like exception names. Plus I learned a lot from its code.

        From the same article:

        Ruby is two parts Perl, one part Python, and one part Smalltalk, says Colin Steele

        The name is already an obvious indication: rubies and pearls are gems.

        In the first docs of Ruby you'll find a clear indication of Perl's influence.

        Now with the decline of Perl, Matz is toning it down.

        Cheers Rolf
        (addicted to the Perl Programming Language and ☆☆☆☆ :)
        Wikisyntax for the Monastery

      Yeah sounds like typical "bros" (childish)

        Yeah… the Perlprogrammiererkonzentrationslager thing was not an isolated incident. And I personally prefer childish over menacing.