Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Why should any one use/learn Perl 6?

by Anonymous Monk
on Jun 13, 2018 at 20:03 UTC ( #1216586=note: print w/replies, xml ) Need Help??


in reply to Why should any one use/learn Perl 6?

Perl6 seems like an elaborate practical joke. Compared to Perl5 many things are literally backwards for no apparent reason (pop @array is now @array.pop because, it's backwards! yay). Since array elements are scalars you logically use $array[n] in Perl5, but Perl6 does away with all that: @array[n] :-(

The English-like ease and logic of Perl5 is gone, replaced by more abstract concepts expressed in bizarre constructs and... UNICODE. If these kinds of radical changes were attempted for the languages we speak the joke's hostile intent would be much more apparent (let's create illiterates). It has been clear from the beginning that Perl6 is a reaction to Perl5 by people who hate Perl5 and want something else. So haters are writing the new language and this includes Larry who refers to the ways of Perl5 as "Warts"!

Too bad all that work didn't go towards improving Perl5 to meet and beat all the challengers it has been beaten to hell by in the past 20 years.

http://design.perl6.org/Differences.html

  • Comment on Re: Why should any one use/learn Perl 6?

Replies are listed 'Best First'.
Re^2: Why should any one use/learn Perl 6?
by liz (Monsignor) on Jun 13, 2018 at 22:18 UTC

    pop @array is just as legal in Perl 6 as it is in Perl 5. TIMTOWTDI, remember?

    If you have ever taught Perl 5 to a group of newbies, than you will have know that sigil variance is one of the hardest things to explain. In Perl 6 you should consider the sigils (and the twigils) as part of the name. That makes it also much easier to explain indexing on sigilless variables (yes, Perl 6 haz them)!

    Wrt "haters writing a new language": I was not aware that Perl 6 was written by Python devs :-)

    Wrt "Warts": Even a rock star programmer has code that they've written in the past that they would now do differently. Larry is no different.

    Wrt "Too bad": Looking back on what might have been, will not help us in the future. Perl 5 will not go away. Perl 6 won't go away either. They are both the result of a Perl mindset.

Re^2: Why should any one use/learn Perl 6?
by Anonymous Monk on Jun 14, 2018 at 01:56 UTC
    Perlmonks are so... excellent. Thank you (Your Mother & liz) for exposing my ignorance gently. I didn't know we could timtowdi old syntax. How far does it go? I've done some reading but not that Perl 5 code can be dropped into Perl 6.

    > sigilless variables (yes, Perl 6 haz them)!

    Is that good? I thought barewords were bad practice. It's been pounded into our heads not to use the old global open FILE convention so now we write open my $file. I realize the implementation is problematic but the original logic of uppercase bare filehandles seems sound considering their relation to STDIN and friends. Is Perl6 going back to the future?

    > There is nothing at all stopping Perl 5 from success today except a lack of applications;

    That could change overnight. There's an absurd amount of raw power in the Perl ecosystem. What if we decided to deploy as much functionality of CPAN as possible into something like http://blogs.perl.org/users/yang_bo/2018/04/a-new-linux-distribution-with-perl-as-its-heart.html? I'm sure it would rock.

    > and general inability to compile or deploy directly to mobile.

    Why is that? Does TPF need to fund a grant? How hard is it?

    github.com/mid1221213/perldroid www.corion.net/talks/perl-on-android/perl-on-android.en.html blog.thireus.com/how-to-install-ios-perl-framework-on-iphone-ipod-touc +h-or-ipad/

    > If no one had stepped up

    Perl 5 has evolved very nicely thanks to its modular architecture.

    > the game and its rules

    This place has the best referees :-)

    Perl 5 will not go away. Perl 6 won't go away either. They are both the result of a Perl mindset.

    I guess it doesn't matter, sorry for the rant https://github.com/niner/Inline-Perl5

      ++ You have a good attitude and that was a kinder reply than I had coming. :P

      I do my best to be a Perl booster but I am much busier today than 10 years ago when I was much more active at it. I don't have any specific recommendations for apps/code today but there are a few areas Perl has fallen behind Java and Python in particular in libraries. Medical systems in particular. Perl was the first through the door and there are still some terrific pieces like UMLS::Similarity but in most other important areas, like HL7 and DICOM, Perl is lacking. It's where I work today and I would love to have a crack at fixing the situation but it's too much work, the standards are wide and generally badly designed, and there are already C/C++ and Java libs to do everything I need.

        I don't know anything about it but what's wrong with the DICOM and HL7 modules on CPAN?

        The nice thing about glue is that it can leverage everything. I love how Perl can inline other languages, and vice versa. If there is a will, and the skill, and some time; there is a way. All the other kids can import pcre and Perl can and should just appropriate wheels it can't or won't reinvent:

        use Python::NumPy; use Python::HL7apy; use Python::Pydicom;
        Seems kinda easy too https://metacpan.org/search?q=python
      I've done some reading but not that Perl 5 code can be dropped into Perl 6.

      Indeed, you can not. But like the Queen's English vs American English, they look very much alike. With subtle differences. -> became ., . became ~, sigils don't vary, and you must put a comma after the block in a map. But by and large, you can write Perl 5-style in Perl 6, just as you can write C-style in Perl 5. Even moreso if you use P5built-ins, which exports a growing number of functions (currently at 100 or so) that exist in Perl 5, with the same semantics as in Perl 5. Think about things like tie, opendir, pack/unpack, but also things that exist in Perl 6 but have magic attached (such as shift shifting from @_ or @ARGV by default).

      I thought barewords were bad practice.

      Indeed they are, they don't exist in Perl 6. A sigilless variable needs to be defined: it usually indicates an alias. E.g. in a for loop:

      for @foo -> \element { say element }

      Or as a direct alias to a value in a hash:

      my %hash; my \foo = %hash<FOO>; dd %h; # Hash %h = {} foo = 42; dd %h; # Hash %h = {:FOO(42)}

      So, no, those are not barewords like Perl 5 has them. Perl 5 will happily accept say BAR as valid syntax, Perl 6 does not (unless you have defined BAR in that scope).

      $ perl6 -e 'say BAR' ===SORRY!=== Error while compiling -e Undeclared name: BAR used at line 1

      And yes, all of Perl 5 CPAN is available at your fingertips if you have Inline::Perl5 installed. The only thing you need to do, is to add :from<Perl5> to your use statement, so e.g.

      use DBI:from<Perl5>; use DBD::mysql:from<Perl5>; my $dbh = DBI.connect(...); # call DBI->connect(...) under the hood

      It really can't get much simpler than that, I would say, thanks to all the hard work of Stefan Seifert

Re^2: Why should any one use/learn Perl 6?
by Your Mother (Archbishop) on Jun 13, 2018 at 20:17 UTC

    Disagree completely, on every point; with the possible exception of semantic scalar/array/hash sigils. There is nothing at all stopping Perl 5 from success today except a lack of applications; and general inability to compile or deploy directly to mobile. Plenty of us are completely happy with Perl 5 as it stands.

    The blocking issue is the world wants applications, not programming languages. If no one had stepped up to do Catalyst, DBIC/Rose, Moose, Plack, a handful of the better ::Tiny modules, Unicode, and date handling and all the fantastic ecology those things enabled and inspired then Perl would already be completely dead as a professional greenfield language.

    Armchair project managers are worse than armchair quarterbacks. At least the armchair quarterback usually knows something about the game and its rules.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (9)
As of 2021-01-26 12:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?