Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Curious about Perl's strengths in 2018

by LanX (Saint)
on Apr 12, 2018 at 07:25 UTC ( [id://1212718]=note: print w/replies, xml ) Need Help??


in reply to Curious about Perl's strengths in 2018

Perl is more "meta" than Python.

It embeds different elements and paradigms of other languages, Python is certainly not tolerant here. (E.g. lambdas* allow only one statement, WTF? )

It's also more DWIM and has a far better package system. And strict is a real advantage for debugging.

I can often judge bad code by the look, while Python code always looks the same. (I call this the LaTeX effect.)

CPAN is vast, the hottest thing is the fact that it includes everything.

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

*) anonymous subs in Perl.

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

Replies are listed 'Best First'.
Re^2: Curious about Perl's strengths in 2018
by Crosis (Beadle) on Apr 12, 2018 at 08:00 UTC

    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 of—if it is, not in any way I want to use). awk is Turing-complete but much less capable than Perl otherwise.

      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.

        Yeah sounds like typical "bros" (childish)
Re^2: Curious about Perl's strengths in 2018
by Crosis (Beadle) on Apr 12, 2018 at 07:48 UTC

    lambdas in Python are a particularly weak aspect of the language; I will readily agree with that. But overall Python is pretty multi-paradigm. In addition to the object-oriented features that are more well-known there are several standard modules that assist with functional programming: functools, itertools and operator. There's third-party stuff, too, but I haven't really looked into it.

    Perl strict is useful. I seem to remember always using both strict and warnings for anything other than one-liners in a pipeline. But it's much like ES6 strict in that the core language tends to be kind of lax and this needs to be addressed. It's not an issue all languages have.

    I don't know what CPAN as a package system per se is like these days. I will say that it annoys me when pip, the de facto Python package manager, overrides packages that are a part of the Ubuntu repository that get regular updates, because pip doesn't do automatic updates, but I don't know if that would be an issue with CPAN now.

    Re: code appearance, I never minded that Python requires very regular indentation. It's something everyone should do. But you may be right about code smells being more apparent if this structure is not required.

    I appreciate that CPAN remains very active and alive given the relatively diminished size of the Perl user base. That's a good thing. Unfortunately, for the purposes of machine learning, which is something I am very interested and involved in, it's not really there.

      I'm not that proficient in Python° and have some questions:

      • Is there anything remotely comparable to metacpan.org in Python? PyPi looks rather "simplistic".
      • Have you seen the ease of cpanm ?
      • Is there any community site comparable to perlmonks?

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

      °) which might be our biggest problem answering your questions...

        I don't know how well CPAN and PyPi compare. For the most part, if I need something, I just either install the Ubuntu package (if one exists and is adequately up-to-date) or sudo -H pip3 install <the thing>. That's about as much as I need to interface with the two package systems in this case.

        There are various Python fora out there, including subreddits. I can't comment on how good they are because I never used any of them. I rarely have issues with Python or elements of its third-party ecosystem and when I do there has always been something on Stack Overflow to answer my questions.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1212718]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (4)
As of 2024-04-19 04:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found