Announcement

Collapse
No announcement yet.

Perl 5.38 Released With Experimental Class Feature, Unicode 15

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Perl 5.38 Released With Experimental Class Feature, Unicode 15

    Phoronix: Perl 5.38 Released With Experimental Class Feature, Unicode 15

    After being in development for more than one year, Perl 5.38 released today as the latest feature update to this programming language...

    Phoronix, Linux Hardware Reviews, Linux hardware benchmarks, Linux server benchmarks, Linux benchmarking, Desktop Linux, Linux performance, Open Source graphics, Linux How To, Ubuntu benchmarks, Ubuntu hardware, Phoronix Test Suite

  • #2
    Ok, cool!
    But when will Perl have a switch-case statement like many other languages?
    It sucks to have many if-else conditions and it sucks to have warnings with given-when!

    Comment


    • #3
      Originally posted by Danny3 View Post
      Ok, cool!
      But when will Perl have a switch-case statement like many other languages?
      It sucks to have many if-else conditions and it sucks to have warnings with given-when!
      Same here. And the docs say given/when will be removed in v5.42.0.

      If you have ideas, please submit them here: https://github.com/Perl/PPCs

      Comment


      • #4
        Originally posted by Danny3 View Post
        Ok, cool!
        But when will Perl have a switch-case statement like many other languages?
        It sucks to have many if-else conditions and it sucks to have warnings with given-when!


        Written by the same guy who wrote the new Class functionality for perl 5.38 You can use his Object::Pad (from which the new Class feature was based) using https://metacpan.org/pod/Feature::Compat::Class with older perls. It has some features that aren't in the current class functionality yet.

        Paul Evans has tons of awesome modules.

        Comment


        • #5
          Wow, Perl is getting classes, something almost every other language had since decades ago. Well except for JavaScript which got it in 2015.

          Originally posted by Danny3 View Post
          Ok, cool!
          But when will Perl have a switch-case statement like many other languages?
          It sucks to have many if-else conditions and it sucks to have warnings with given-when!
          Python doesn't have a switch statement either, or well it didn't up until recently when the match statement was introduced in Python 3.10 released in 2022.

          Comment


          • #6
            For what I use Perl for, classes and unicode (really?) aren't needed. But nice to see Perl getting some love .. so to speak.

            Comment


            • #7
              Originally posted by rclark View Post
              For what I use Perl for, classes and unicode (really?) aren't needed. But nice to see Perl getting some love .. so to speak.
              Perl has had unicode support since forever if you enable it. This is just for unicode v15. Probably some more emojis or something.

              For those complaining about switch statements, if/else isn't really much more typing and perl has tried a *few* switch idioms over the years.. Perl has other similar short syntax alternatives - take a look at this StackOverflow answer for a list of easy for / regex equivalents that literally are less typing than the old perl use Switch and has a ton more flexibility - onsidering the alternatives, this is actually readable perl. https://stackoverflow.com/a/34819245

              A built-in class is nice but 20 years too late. I have fond memories of perl - and the schwartzian transform influenced most languages - but I am also glad I've moved on. I just hope the continued love doesn't break old utilities/scripts and pragmas, I'm rusty enough now I can't even maintain my cpan stuff anymore. I presume most of the cpan modules are in this place which also doesn't really make me want to go back.

              Comment


              • #8
                Originally posted by panikal View Post
                A built-in class is nice but 20 years too late.
                I thought they rejected classes? Those that wanted them had Raku as the failed Perl 6. They are just going in circles.

                Originally posted by panikal View Post
                I presume most of the cpan modules are in this place which also doesn't really make me want to go back.
                To be honest, most language based package / dependency stores turn into this before long. NPM, and crates.io may be popular now (as CPAN was) but they will ultimately turn into the same old sad neglected places. Again, just going in circles.

                Comment


                • #9
                  What was wrong with the old blessing system?

                  Comment


                  • #10
                    When I learned Perl in 2019 it quickly became my favorite language ever. C like syntax with Bash like simplicity.

                    Comment

                    Working...
                    X