Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Perl Contempt in My Workplace

by QM (Parson)
on May 31, 2021 at 14:50 UTC ( [id://11133327]=note: print w/replies, xml ) Need Help??


in reply to Perl Contempt in My Workplace

For all the equivalencies between Perl and Python, I miss these most in Python:
  • strict and warnings
  • variable scope
  • variable assignment in expressions (though there is now a restricted version in Python)
  • autovivification
  • one-liner capabilities
  • sigils

And I don't care for the GIL, but it seems that's a big problem however you slice it, for many languages.

-QM
--
Quantum Mechanics: The dreams stuff is made of

Replies are listed 'Best First'.
Re^2: Perl Contempt in My Workplace
by LanX (Saint) on May 31, 2021 at 17:49 UTC

    > variable scope

    Python has function scope, I think you mean block scope.

    I'd add

    • Lambdas (= Ano. Subs) with more than one expression

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

      Python has function scope, I think you mean block scope.

      I literally meant the scope of variables. :D

      -QM
      --
      Quantum Mechanics: The dreams stuff is made of

        > the scope of variables. :D

        Python has 4 types of variable scope°

        Block scope like in Perl is none of them, with or without curlies.

        But this doesn't mean that "variable scope" is missing in Python.

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

        °) see also Re^2: Perl Contempt in My Workplace

Re^2: Perl Contempt in My Workplace
by eyepopslikeamosquito (Archbishop) on Jun 01, 2021 at 01:17 UTC

    Agreed! Especially Perl vs Python variable scope. This was discussed at length a few months ago -- see especially the many insightful replies from the LanX. :)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (7)
As of 2024-05-21 11:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found