The future of Perl? (Perl 6, employability)

后端 未结 9 1117
余生分开走
余生分开走 2021-02-02 11:51

I\'ve found a few related questions, like Python vs. Perl (now deleted) and Is Perl Worth it? (now deleted), but I can\'t seem to find anything that directly a

9条回答
  •  无人及你
    2021-02-02 12:15

    Anyone who actually watches the development of Perl, would know that that there has perhaps been more work on the Perl language in the past decade, than in the previous decade.

    This has been spurred on by the introduction of Perl6.


    The introduction of Perl 6 spurred on, the now deeply ingrained, testing culture.

    Just look at how much the Rakudo implementation of Perl 6, is tested:

    Rakudo Progress http://rakudo.de/progress.png


    There has also been a lot of back-porting of Perl 6 features into Perl 5.

    For example, the Perl 6 "switch" statement

    #!/usr/bin/perl
    use strict;
    use warnings;
    use 5.10.1;
    # or 
    use feature qw'switch say';
    
    my $str = "testing 123";
    
    given( $str ){
      when(/(\d+)/){
        say $1;
      }
      when( [0..10] ){
        say $_, 'is equal to some number between 0 and 10';
        # given, sets the current topic "$_"
      }
    }
    

提交回复
热议问题