Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical

Re^6: Curious about Perl's strengths in 2018 (updated)

by LanX (Cardinal)
on Apr 13, 2018 at 12:32 UTC ( #1212801=note: print w/replies, xml ) Need Help??

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

Thanks, perfect reference!

Just to highlight this, one telling example...

A friend of mine started to learn Ruby for a new job and found this "totally cool feature" for parsing text:

A flip-flop operator based on the range ".." syntax. °

So he asked himself why Perl doesn't have it and was surprised to find out that Ruby stole it from Perl.

Then he started to read the perldocs more closely and some years later he shocked the world by revealing a DOS attack problem based on the hash key order in many web languages ...

... except Perl, which fixed it already 10 years ago, and documented it in the perldocs. *

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

°) please note how it's first explained with Perl syntax and almost literally translated to Ruby, before repeating it in more "idiomatic" Ruby

*) "Perl was updated to fix this problem in version 5.8.1, which was released in September of 2003. For some reason most of the other languages did not take the cue from Perl and are still vulnerable to these attacks"

Replies are listed 'Best First'.
Re^7: Curious about Perl's strengths in 2018
by eyepopslikeamosquito (Bishop) on Apr 13, 2018 at 23:40 UTC

    Though a lot of stealing goes on between language designers, they often regret it later. Matz wished he never stole Perl's "ugly" $ sigils for Ruby, while in Larry Wall: Perl vs Python 11th State of the Onion Larry regrets stealing Python's object model:

    I don't really know much about Python. I only stole its object system for Perl 5. I have since repented.

    Why has Larry repented? A clue may be given in Slashdot interview with Larry Wall:

    But I think the success of Python has mostly to do with being light enough in its OO model that it could move into some ecological niches more quickly than the Perl 5 design could. Perl has always considered itself primarily a programmer-centric language, while Python has always considered itself to be more institution-centric. So in a sense it's a bit dumbed down, much like Java. You'll note both of those languages make their greatest appeal to managers ... If Python's object model matches how you want to do things, it's fine for that. If it's not, Python doesn't really provide a coherent meta-object model underneath, just a lot of hooks, which might or might not give you the flexibility you need ...

    Other quotes from Larry Wall: Perl vs Python 11th State of the Onion:

    a great deal of Ruby's syntax is borrowed from Perl, layered over Smalltalk semantics. I've always viewed Ruby as a much closer competitor for Perls ecological niche, not just because of the borrowed ideas, but because both Perl and Ruby take their functional programming support rather more seriously that Python does.

    Other quotes from Slashdot interview with Larry Wall:

    Some Pythonistas claim that Python is a good functional programming language, mostly on the strength of list comprehensions, but in my estimation Python has only half-hearted FP support; it really doesn't provide the benefits of lexical scoping, closures, laziness, or higher-order programming that I'd expect in a strong FP contender, nor does it encourage you to think that way ... If you want concurrency with a global interpreter lock, Python might suit. But if you want a concurrency model designed to scale to multicore/manycore, look to Perl 6, which avoids global bottlenecks and non-composable primitives, but instead borrows composable ideas from Haskell, Go, Erlang, and C# instead.

      Thanks, bookmarked! :)

      Larry is far more eloquent in expressing my thoughts about Python's FP (dis)abilities.

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

      I don't quite understand the notion that Python is "institution-centric". It lacks some things that Perl has but I see users having actual enthusiasm for it far more frequently than for, say, Java. There's way less boilerplate and strict control. "Private" methods, for example, are just marked with _ or __ in front as a mere suggestion not to use them outside of the class.

        "I don't quite understand the notion that Python is "institution-centric"..."

        That's quite simple: It is "easier" to teach - better to handle for all the dumb assignments and Powerpoint slides and boring/annoying examinations in "institutions". It doesn't have this anarchical and noncompliant TIMTOWTDI.

        «The Crux of the Biscuit is the Apostrophe»

        perl -MCrypt::CBC -E 'say Crypt::CBC->new(-key=>'kgb',-cipher=>"Blowfish")->decrypt_hex($ENV{KARL});'Help

        "Private" methods, for example, are just marked with _ or __ in front as a mere suggestion…

        That's actually a "borrow word." :P

        You're quite right, nearly no one is enthusiastic about Java. Perl has "won" happiest users surveys and non-scientific google mining a couple of times.

        …as a medium of expression, you could do a lot better. Of all the great programmers I can think of, I know of only one who would voluntarily program in Java. And of all the great programmers I can think of who don't work for Sun, on Java, I know of zero.Great Hackers

        Plenty more gems in that including props for Perl and Python.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (4)
As of 2020-10-25 06:20 GMT
Find Nodes?
    Voting Booth?
    My favourite web site is:

    Results (249 votes). Check out past polls.