Slashdot Mirror


What is Perl 6?

chromatic writes "Perl.com has a new article entitled What is Perl 6?. It analyzes the changes to the language in light of the good and bad points of Perl 5 and provides new information about the current state of the project: Perl 6 exists, you can write code in it today, and it's more consistent and easier to use than Perl 5."

19 of 343 comments (clear)

  1. unfortunately by caffeinemessiah · · Score: 5, Funny

    You can never be told what Perl is.
    You just have to see it for yourself.

    sorry, i just had to.

    --
    An old-timer with old-timey ideas.
    1. Re:unfortunately by value_added · · Score: 4, Funny

      You can never be told what Perl is.
      You just have to see it for yourself.


      Is this what you saw?

  2. What is perl? by Anonymous Coward · · Score: 5, Funny

    Baby don't hurt me,
    Don't hurt me
    No more

  3. Re:What is Perl 6? by Perey · · Score: 5, Interesting

    That's the thing, though. PHP is the big name (from management's perspective), at least in the P category of LAMP, right now. Not that Perl's gone away by any stretch of the imagination, but the existing Perl shops are happy to keep on doing what they're doing, while the PHP advocates crow about how many new jobs are being done in their language.

    So is Perl 6 going to bring about a Perl revival, or is it (as I suspect) going to fall flat when faced with Perl 5's quietly entrenched support and PHP's proclaimed grip on new uptakers? TFA mentions the reasons for cutting backwards compatibility (or at least reducing its priority) far too often for me to be optimistic there.

    I think Perl 6 will catch on, eventually... but it's going to be more of an alternative language, not an upgrade, to Perl 5 for a long time yet.

  4. No language that I like better by BadAnalogyGuy · · Score: 5, Interesting

    I never really understood Data Structures until I learned Perl. I was consistently and thoroughly confused in my DS class. The language used there was C++. There was simply too much baggage in the language that obfuscated the very points we were being taught. If you can't get past the template syntax, how in the world are you going to be able to understand the data structure concepts?

    Then I met Perl (5.003). What a difference it made! The data structures were built in, and on top of that, it was EASY to nest structures to build complex data types. It was like having a semester of Data Structures immediately made clear.

    Then I found myself back with C++ again. First I wrote my own List classes. However I soon realized that STL made available exactly the types of data structures that Perl has. Maps, Lists, Vectors. And since I understood what I was doing in Perl, it was so much easier to catch on with C++.

    Perl taught me C++. Who would have thought?

    1. Re:No language that I like better by patio11 · · Score: 5, Funny
      Perl taught me C++

      Somewhere, a maintenance programmer just slit his wrists.

    2. Re:No language that I like better by Lisandro · · Score: 4, Informative

      Can you recommend a resource for OOP with Perl?

      Right now i found all i needed in the Perl.org site - this OO tutorial for Perl is pretty complete. There's also this one, which is oriented to begginers.

          In fact, i always keep a browser window open to Perl.org when i'm coding Perl - the tutorials are very nice, but the function reference has been priceless to me.

    3. Re:No language that I like better by Anonymous+Brave+Guy · · Score: 4, Funny

      Another is swallowing a bullet, while a third fell on his sword. There's more than one way to do yourself in!

      --
      If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
  5. New Perl excitement by ChrisDolan · · Score: 5, Insightful

    What makes Perl strong, in my opinion, is the community's interest in maintaining a large and well-tested library of useful code in CPAN. Without CPAN, it's not clear that Perl would be as alive and healthy as it is today.

    What Perl 6 offers is a rejuvenation of the language. Perl 5 still works great (better than ever due to new efforts to stamp out even the most obscure bugs) but this new revision is attracting some *really* smart people who are bringing interesting new ideas to the language. Audrey Tang and Luke Palmer come to mind right away.

    My greatest hope, however, is not that a revitalized Perl will squash the other dynamic languages (Python, Ruby, PHP, ECMAScript, etc) but will instead bring them into a state of interoperability. I really, really want Parrot to succeed so well that the other languages decide to target it as a backend so I can trivially call Python or C libraries from Perl and vice versa.

    1. Re:New Perl excitement by killjoe · · Score: 5, Insightful

      Parrot is multi dispach and supports multiple inheritance. It also does not have a patent sword hanging over it like mono does.

      --
      evil is as evil does
  6. Q. What is Perl 6? by dazlari · · Score: 5, Funny

    A.Two Kiwi oysters going at it.

  7. WHOOPITUPTITUDE! by reidman · · Score: 4, Funny

    From TFA:

    Not everyone who starts learning Perl for whipituptitude needs manipulexity right away, if ever, but having a tool that supports both is amazingly useful.

    Whipituptitude?!

    That is awesome. Made up words a--

    Whats this? Manipulexity?

    How much awesome can you cram into a single sentence?
  8. 10 Years Overdue by dorpus · · Score: 4, Insightful

    People in the mid-1990s spoke of "overnight obsolescence", that Perl 6 would replace everything in a few weeks, and that you had better learn a new programming language every month. Over 10 years later, perl 6 is still in beta mode.

    1. Re:10 Years Overdue by chromatic · · Score: 5, Informative
      Over 10 years later, perl 6 is still in beta mode.

      Did you read the same article I wrote or is your post from the mysterious future? Larry announced Perl 6 in the summer of 2000.

  9. Hiring here. by Tei · · Score: 5, Funny

    Hello.

    We need 5 years experience Perl 6 programmers for 3D game. Reference: P6DNF.

    --

    -Woof woof woof!

  10. PDL by LordMyren · · Score: 4, Interesting

    The article talks about some of the defining features for perl. Well, one of the defining features in my perl experience has been Perl Data Language, pdl. PDL _is_ whipitupitude. Its a wonderful wonderful matrix library. And it comes with the best perl shell I know.

    I had to break down a equation into a sequence of linear equations. So I hacked up some PDL in like 2 hours to do that. Couldn't have been easier, even though I'd never used PDL or its perldl perl shell; I just started typing in the interactive shell until it worked as expected and until I knew what I was doing. Then I needed the results in interger, so I rounded everything down, built a permuter and sorted the permuted results for each individual segment. That took three hours, but only because I kept botching the matrix multiplication. Even with huge datasets, generating hundreds of thousands of linear equations, each spanning dozens of datapoints, permuting the linear equations, sorting them and selecting the optimal, PDL would run it all my slow arse 800mhz crusoe laptop in seconds. Matlab couldnt touch it.

    Thats the other really truly thing about PDL; the performance. If someone else would chime in and do it better justice, but my crude understanding is that it generates some kind of extremely optimized machine code on first use and runs whatever equations you've thrown at it like silk from that point on.

    Little late and a little off topic, but PDL really is just a masterpiece of perl hackability. The PDL perl shell is truly spectacular; get some symbolic integrators and differential equation solving packages in there and I wouldn't need to break open Mathematica or Matlab ever again. Ok, long way away, pdl is really just about matricies, but it is really really sweet, and its shell is good for anyone who just wants to try something out really quickly in fully interactive perl.

    That being said, I really cant wait to see where the perl6 VM is going.

    G'night!
    Myren

  11. Re:My short experience with perl... by cliveholloway · · Score: 4, Informative

    Oh please.

    "Especially when every perl doc I see around tells me to use curved parentheses for lists, and @ prefixes for variables that refer to them..."

    How hard did you look, really? If you go to Google and type in perl list of lists, the FIRST link takes you here.

    And within 1/2 a page, you see this:

    # assign to our array a list of list references
    @LoL = (
    [ "fred", "barney" ],
    [ "george", "jane", "elroy" ],
    [ "homer", "marge", "bart" ],
    );

    print $LoL[2][2];
    bart

    Damn anti-Perl trolls :-)

    --
    -- Trinity in high heels carrying a whip: The donimatrix - there is no spoonerism
  12. Meditations on Perl 6 by starX · · Score: 4, Funny

    If the release of Perl 5 was any indication, Perl 6 is the single magic bullet that will kill all of my (Perl) code.

    Perl 6 may be more akin to a divine programming language, which makes the implimentation of complex data structures simple and sublime. Then again, it could all be a nasty trick to lead us away from the true path of enlightenment.

    Perl 6 is not .NET.

    Perl 6 is not controlled by any major corporation; I haven't decided whether this is advantageous or not yet.

    If I were to have a child, would it be written in Perl 6?

    Can Perl 6 be used to unlock the secret mysteries of the Bible code to reveal the end times?

    Is Perl 6 really being developed by the descendants of Jesus Christ? Is the Pope trying to cover it up? Does the Pope know what Perl is? If so, is using Perl 5 a sin? How about Perl 6?

    I bought a preview book on Perl 6 a few years ago. Is it still useful? Can I have my money back?

    If Ruby was an upgrade to Perl, and Perl 6 is a an upgrade to Perl and Ruby, will Ruby need to changes their name in such a way as to play off of Ruby Tuesdays?

    If I enter the Perl 6, can I change my mind later?

    If Perl 6 is brillian, but no one uses it, is it still brilliant? What if it's awful and everyone uses it?

    So very tired....

  13. Re:My short experience with perl... by BadAnalogyGuy · · Score: 5, Informative
    This is one area where the Perl docs (as detailed as they may be) fail new users.

    Intuitively, a new user would look at the TOC and see perldata "Perl Data Types" and think that the complete definition of the 3 main Perl data types would be described. So rsidd looks for instructions on creating multidimensional arrays, sees "List value constructors" and gets this:

    LISTs do automatic interpolation of sublists. ... arrays and hashes lose their identity in a LIST... To make a list reference that does NOT interpolate, see the perlref manpage.


    So they head over to perlref (an extra level of indirection) and notice in Item 2:

    A reference to an anonymous array can be created using square brackets:

            $arrayref = [1, 2, ['a', 'b', 'c']];

    Here we've created a reference to an anonymous array of three elements whose final element is itself a reference to another anonymous array of three elements. (The multidimensional syntax described later can be used to access this. For example, after the above, $arrayref->[2][1] would have the value ``b''.)


    But this isn't really easy to understand. Why does he need an arrayref when he wants an array?

    @array = [1, 2, ['a', 'b', 'c']];

    That isn't the same as what he wants. In fact, it's not what you'd expect from DWIM. It's a single entry array, not a multidimensional array. It's not even a list of lists (unless you perform a little magic on it).

    So finally after struggling with this and ending up with some ugly monstrosity like the following:

    @array = @{[1,2,\@{['a','b','c']}]};

    Now his code works, but it isn't very easy to understand, and the maintainers of this code are going to tell everyone how evil and illegible Perl is because the programmer here couldn't figure out how to make a multidimensional array.

    The only FAQ entry with the term "multidimensional" in it refers to some DBM-specific topic that doesn't seem to have any relation to the problem at hand. While "list of lists" may be the preferred term in the Perl community, it would be nice to have a FAQ entry like "How do I create a multidimensional array?"

    As you've mentioned, perllol has the exact syntax of how to do this. Unfortunately for our poor programmer, the link to that is buried in the See Also section alongside perldsc (which is large and contains quite a bit of irrelevant information like 'use strict' information, while at the same time not providing very detailed information about the data structures themselves). The very first 'perldoc perllol' page displayed gives the answer immediately:

    An array of an array is just a regular old array @AoA that you can get
    at with two subscripts, like $AoA[3][2]. Here's a declaration of the
    array:

            # assign to our array, an array of array references
            @AoA = (
                          [ "fred", "barney" ],
                          [ "george", "jane", "elroy" ],
                          [ "homer", "marge", "bart" ],
            );

            print $AoA[2][2];


    Why is it so hard to get to this simple explanation? Why should a neophyte have to go through two documents to finally get to perllol? The FAQ should describe the technique using "multidimensional" as a keyword.

    I love Perl, and I love the depth and breadth of the Perl docs, but they are difficult to navigate for Perl neophytes.