Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^3: Curious about Perl's strengths in 2018 -- freedom

by Discipulus (Canon)
on Apr 12, 2018 at 07:53 UTC ( [id://1212721]=note: print w/replies, xml ) Need Help??


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

> unique strengths of Perl in the present time

I wonder about the meaning of this: probably there are no unique strengths in Perl that are not present in other laguages. Perl has for sure the richiest regex system but almost all other languas have something working.

Perl makes a big effort to support unicode but is, iirc, not the best laguage in this respect.

Perl lets you to program in a OO style but does not force you to do so. Perl allows parallelism...

I've already said: I'm not the best monk to do comparison between programming languages. Infact I took Perl many years ago and never felt the necessity to use something else: perl let me the possibility to do almost everything I imagine (and I have a big imagination) and do it the way I like. Probably this is the best thing I perceive about the language: freedom.

Maybe this freedom born with perl itself in a gold age, before computer science was fagocitated by new economy. See this interesting post

L*

There are no rules, there are no thumbs..
Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.

Replies are listed 'Best First'.
Re^4: Curious about Perl's strengths in 2018 -- freedom
by Your Mother (Archbishop) on Apr 12, 2018 at 08:03 UTC

    I believe Perl actually is the best language for Unicode support and regular expressions. merlyn worked out a chart of it for all the major languages a few years ago so it may not be true today but I know every new release stays on top of the Unicode Consortium standards so I expect it hasn't changed. I also believe Perl to be the best command line language and the best prototyping language. As far as core language features go, I personally feel Perl is the head of the pack. It is applications and packages in areas of current interest, as mentioned in the OP, where Perl is increasingly in the rear view mirror.

Re^4: Curious about Perl's strengths in 2018 -- freedom
by Crosis (Beadle) on Apr 12, 2018 at 08:49 UTC

    Perl definitely deserves a lot of credit for innovations in regular expressions that everyone else has since adopted.

    I don't know about Perl Unicode support offhand. I remember there were things that absolutely sucked about Python Unicode support in the 2.x days—I had to set PYTHONIOENCODING=utf-8 for programs with Unicode output or I'd get a nasty fatal error. Since Python 3 these issues have disappeared. Ruby also used to have issues with Unicode, which strikes me funny because the creator is from Japan, but as far as I know they've been squared away.

    Python doesn't enforce OO like Java does. You can mix traditional imperative, OO and functional styles to your heart's content. As far as parallelism is concerned, Python has a global interpreter lock, which hampers native threading. Extensions written in C or C++ can circumvent this and have no issues if you're careful. It's also possible to circumvent the GIL in Cython, presumably with the same caveats. (I haven't used Cython.)

    Your point about freedom isn't lost on me. I remember feeling the same way when I was at the height of my Perl proficiency, years ago. I didn't lose too much when I drifted to Python though. It really all depends on what you're doing. Machine learning is an area where Python is particular strong. The most central library is scikit-learn, which is implemented in part on the dependencies numpy and scipy, whose most critical elements are written in C, C++ and Fortran. The end result is a package as convenient as anything else in a very high-level language, yet nearly as efficient as the systems programming languages that are used to optimize the most intensive parts of the process. There isn't anything that really compares to this in Perl (or Ruby or JavaScript, for that matter) but if you're in some other domain and you really like aspects of Perl where this third-party support is not essential then you can definitely have a ball with it!

    I looked at the post you linked and I'm not sure what to think. I'm not any huge fan of capitalism but I'm not sure it can be blamed for crummy programming languages. At one point, Perl was very much in favor in capitalistic terms. Now, JavaScript is more in vogue in the capitalistic marketplace and it has features that the author of the post exalts. strict not being enforced is one example: ES6 has strict, inspired by Perl, but it's not required. "And it's also interesting that most Perl OOP tutorials ground you with 'Perl OOP is nothing but a blessed hash ...'" is more or less equally true of JavaScript objects. Basically they're a glorified dictionary (or hash) and the only really important elaboration upon this is the prototype system, which came from Self, a language that I'm not aware was ever very commercially successful. The author is also not happy about Java. Some things about Java are pretty gross and there's too much boilerplate but Java 8 was a definite step up and there are a number of languages on the JVM, most notably Scala and Clojure, that aim to have many of the advantages of Java but much more expressiveness and convenience. As far as I can tell they are having some commercial success.

      and there are a number of languages on the JVM, most notably Scala and Clojure, that aim to have many of the advantages of Java but much more expressiveness and convenience.

      Raku is also among that number, AIUI.

      Larry Wall, as quoted in Re^7: Curious about Perl's strengths in 2018, nailed it in two hammerings while it took me 20:

      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.

      Of course what he says is not divine law. My very limited experience agrees though.

      Regarding JavaScript (JS/ES), interesting article here (https://auth0.com/blog/a-brief-history-of-javascript/) about the influence of Java on JS/ES and the climate and politics it was created in, e.g. Netscape. Reminds me of a Huckleberry Finn of languages vs the Tom Sawyers and, god forbid, the Sid Sawyers. Brrrrrr. So maybe JS/ES was created as a child who escaped the attention of parents and plays all day long on the street (picture: fire hydrants splashing water). Could JS/ES be the last of that breed? Has any other child been allowed to play all day long since 2000?

      bliako

        Interesting article about JS, but it's again hiding the influence of Perl here.

        Apart from syntax is Perl the closest language.

        With 3 major failures:

        1. It's totally unfortunate that Eich chose to allow Perl like scalar transformations with the limited set of Java operators. The DWIM magic rules for == and + are annoying because eq and . are missing.

        2. Also is JS hampered by implementing associative arrays as objects.

        Objects in JS are (in Perl terms) best described as tied hashes, where missing keys trigger a look up into a chain of "prototype" hashes.

        While I like prototypical inheritance it's annoying if I need to deal with inheritance when I only want a hash.

        3. Hoisting of var declarations and missing block scope leads to far too many ugly work arounds to mimic the effects of my

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

        What counts as "programmer-centric" is very subjective. Some might say that describes Clojure very adequately but Larry Wall himself for example is on record telling Usenet how aesthetically unappealing he finds any form of Lisp.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (5)
As of 2024-03-28 23:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found