Catch up on stories from the past week (and beyond) at the Slashdot story archive

 



Forgot your password?
typodupeerror
×
Perl Programming IT Technology

Apocalypse 12 From Larry Wall 55

rheum101 writes "Larry Wall just released the eagerly anticipated Apocalypse12 . detailing Perl6 OO in all it glories. To quote the author -> 'One other note: if you haven't read the previous Apocalypses and Exegeses, a lot of this is going to be complete gobbledygook to you. (Of course, even if you have read them, this might still be gobbledygook. You take your chances in life...).'"
This discussion has been archived. No new comments can be posted.

Apocalypse 12 From Larry Wall

Comments Filter:
  • by Pan T. Hose ( 707794 ) on Saturday April 17, 2004 @12:20PM (#8891816) Homepage Journal

    I have submitted [slashdot.org] a story but it was rejected, so please let me resubmit it as a first post instead.

    The long awaited Apocalypse 12 [perl.com] by Larry Wall has been just announced [google.com] by chromatic [wgz.com] on perl6-language [perl.org] mailing list. It is one of the most important documents explaining the Perl 6 [perl.org] language design. (All of the previous design decisions are available as Apocalypses [perl.org] by Larry Wall, Exegeses [perl.org] by Damian Conway and Synopses [perl.org] by Luke Palmer, Damian Conway and Allison Randal.) Apocalypse 12 talks about Object Oriented aspects of Perl 6, i.e. about Objects, Classes, Roles (also known as Traits), Multiple Dispatch and also covers some non-OO decisions:

    "The official, unofficial slogan of Perl 6 is "Second System Syndrome Done Right!". After you read this Apocalypse you will at least be certain that we got the "Second System" part down pat. But we've also put in a little bit of work on the "Done Right" part, which we hope you'll recognize. The management of complexity is complex, but only if you think about it. The goal of Perl 6 is to discourage you from thinking about it unnecessarily." --- Larry Wall.

    (Lameness filter didn't allow me to post the table of contents. Reason: Please use less whitespace.)

    You can access the entire document as a print friendly version [perl.com]. The standard version of Apocalypse 12 [perl.com] is divided into 20 parts. Enjoy.

    If you are new to Perl 6 [perl.org] and Parrot [parrotcode.org], then Perl 6 Essentials [oreilly.com] by Allison Randal, Dan Sugalski and Leopold Tötsch might be a great introduction. The second edition should be published soon.

  • Perl6 is a mistake (Score:1, Interesting)

    by rqqrtnb ( 753156 )
    I've been using perl pretty much constantly since the Pink Camel, and believe me, Perl 5 is an extremely good language for quick scripting things. That's what it was designed for. Sure, you can do big projects in it, but it's not exactly ideal. Recently I've started using Ruby [ruby-lang.org] as well, and I intend to move my department over to it instead of wasting time with Perl 6.

    One of the goals of Perl 6 is to make non-trivial projects possible. That's good. The way it's being done is bad. Perl was once a lightweight

    • by Pan T. Hose ( 707794 ) on Saturday April 17, 2004 @12:36PM (#8891918) Homepage Journal

      The same goes for the syntax. All the switching between $, @ and % is really irritating (ask a newbie how to get at the length of the keys array of a hash inside a hash, for example), and the changes proposed for 6 are just making this worse [emphasis added]

      The changes proposed for Perl 6 means no switching between $, @ and % any more.

    • It seems like you had something interesting to say, and you went to the trouble of writing it, so why wrap it in insults and promotion (ruby). I was looking for something with valid criticisms to moderate up, but you are not it. (Now that I've posted I can't moderate anything here.)
    • by Anonymous Coward
      ruby? Python? Kid's toys.

      Common Lisp. Enough Said. Okay maybe Scheme, if you're a bit of a masochist...

      • Everyone is Right (Score:3, Informative)

        by Pan T. Hose ( 707794 )

        ruby? Python? Kid's toys.

        Common Lisp. Enough Said. Okay maybe Scheme, if you're a bit of a masochist...

        Everyone is right here. There is no one language which is best for everyone. Perl 5, Perl 6, Ruby, Python, Lisp, Scheme... They are all going to target Parrot [parrotcode.org] so we will be able to choose our favourite language and still work together instantiating our objects and even inheriting from each other's classes crossing the cross-language boundaries. A very impressive work has already been done in the

    • The way it's being done is bad. Perl was once a lightweight, extremely flexible language. Now it's become a huge ugly monster. People wanted OO, so a nasty hack was bolted on top to allow some semblance of it. Now this nasty hack is being expanded. Sure, the code's different, but the basic form is the same. Kludge upon kludge upon kludge; I'd much rather have a nice, clean, pure language (and not one with loads of irritating whitespace thank you very much).

      Have you read A12 yet? It's not as bad as you th

    • Flex Link (Score:2, Informative)

  • by moof1138 ( 215921 ) on Saturday April 17, 2004 @12:34PM (#8891900)
    I have a lot of Perl code out there that is probably going to take a while to port, but I have to say that a lot of the changes here really do make me sigh in relief. Lots of what Larry was going over here are the bits I am looking forward to in Perl 6. I use OOPerl, but never have really liked it. The object system will finally make a lot more sense, and be a lot more intuitive for those coming from other OO languages. The fact that we will real classes instead of magic packages, we get to use the keywords 'class' and 'method' rather than 'package' and 'sub', we se dots to dereference objects instead of ->, and so on are nice. There still are a lot of the clever perlisms left over, and there are a lot of cool looking innovations in perl 6, and I am happy with that.

    Over all I am really excited about Perl 6. I know it will take a lot of relearning, and some code is going to be a bitch to update, but porting isn't necessarily required unless there is a compelling reason to move to 6, and the more I read about the cleaner approaches to old problems in Perl 6 the more I like it. I also expect many of the changes should help raise Perl above some of the criticisms of language snobs.
    • Comment removed based on user account deletion
      • I am not sure I follow you here. Maybe I missed your point, but this runs fine for me:

        #!/usr/bin/perl -w
        use strict;

        my @array;

        $array[6][4][2][5][6] = "whoa!";

        print $array[6][4][2][5][6];
      • I haven't been following perl 6 too closely, is there any word on if Perl will be getting rid of the multi dimensional array hack of having to use references? This is something that dates back to Perl 4. It could have been fixed in Perl 5 but was the whole references thing was introduced for backwards compatability. But so much is changing in Perl 6 anyway it would be nice to be able to do things like @array[6][4][2][5][6] = "whoa!"

        See perldoc perllol: Manipulating Arrays of Arrays in Perl [perldoc.com].

      • A syntax shortcut was added in 5.0 so that you don't have to know about the
        references if all you're doing is $foo[$w][$x][$y][$z] = $bar; it just works.
        The old Perl4 way of doing things is heavily deprecated and very seldom used.

        It is true that multidimensional arrays are implemented using references,
        but frankly under the hood so are single-dimension arrays. For example,
        in a subroutine the elements of @_ are actually aliases to the arguments
        that were passed in. (Now *this* is changing in Perl6, because w
        • > However, it will be possible for a routine to get Perl5-like semantics for
          > @_ if that's what it wants.

          BTW, I think that will be spelled something like this:
          sub foo (*@_ is rw) { Subroutine_Code_Goes_Here }

          The * flattens any lists or arrays that are passed in, giving you one big list.
          @_ is what Perl5 called its arglist variable, so I called it that to match
          what it would be in Perl5; you could call it @args or whatever if you prefer.
          is rw means read/write, i.e., you can modify it. I could be sligh
  • Thank you! (Score:5, Interesting)

    by Pan T. Hose ( 707794 ) on Saturday April 17, 2004 @12:57PM (#8892060) Homepage Journal
    In the name of the entire Slashdot community, I would like to thank Larry Wall for the absolutely amazing work he is doing. Thanks Larry! There are many people working very hard to make our dream come true and give us the most innovative and cutting-edge programming language in existance, which Perl 6 is soon going to be. It would not be possible without all of the Perl 6 [perl.org] and Parrot [parrotcode.org] contributors. Please let us also not forget about brave people who still actively maintain Perl 5 [perl.org] and will keep doing it even after Perl 6 is ready. The Ponie [poniecode.org] project shows us that Perl 5 is not going away. The work of all of those people is invaluable. And this is all to give us free software development platform of the 21st century, while uniting Perl, Python, Ruby, Tcl, Scheme, Ook, Forth, Befunge, BASIC and many other languages thanks to Parrot, finally allowing them all to seamlessly work together and ending the flame wars between them. Thank you!
    • Well, if you want a innovative language (rather than a pragmatic one), Haskell [haskell.org] should definitely not be left out. Granted, it may be a little hard to use if you just want to write real-life programs (quite a lot of computer-science stuff are involved just for mutable state), but its interestingness beats OCAML and even Lisp if you are getting tired of 20 slightly different imperative languages. The language is also well supported in the free software community.

      Of course, I'm not disparaging Larry's work

      • Well, if you want a innovative language (rather than a pragmatic one), Haskell should definitely not be left out. Granted, it may be a little hard to use if you just want to write real-life programs (quite a lot of computer-science stuff are involved just for mutable state), but its interestingness beats OCAML and even Lisp if you are getting tired of 20 slightly different imperative languages. The language is also well supported in the free software community.

        Haskell is very interesting indeed. And

        • C++ has been getting functional of late, if you're into Boost.
          Perhaps there is something to this bit about all roads leading to Lisp.
          I'm curious to see how well Parrot, Python, and Boost::Python will get along, myself...
        • Re:Haskell - Parrot (Score:2, Interesting)

          by jonadab ( 583620 )
          > As a sidenote I might add that Perl 6 will support the functional paradigm.

          Perl5 supports *portions* of it already. closures are already fully supported,
          as well as list-transformation functions. I suppose you meant that Perl6 will
          widen its support so that it can handle full-blown FP with continuations and
          the whole works, which matches what I've heard.

          > It is just not the only paradigm it will support.

          Heckno. Perl will always support contextual programming and imperative
          programming; object-orie
          • As a sidenote I might add that Perl 6 will support the functional paradigm.

            Perl5 supports *portions* of it already. closures are already fully supported, as well as list-transformation functions. I suppose you meant that Perl6 will widen its support so that it can handle full-blown FP with continuations and the whole works, which matches what I've heard.

            Closures are already supported indeed, but Perl 5 lacks the essential built-in support of lambda calculus. It will change in Perl 6. As Larry W

            • Actually, we were talking about Roles (though not calling them that) before that paper was written. It was good fortune that two members of the design team caught Andrew Black's presentation of the paper and sent it along to Larry with a note saying "This must be a good idea; Smalltalkers are thinking about it too!"

              • Actually, we were talking about Roles (though not calling them that) before that paper was written. It was good fortune that two members of the design team caught Andrew Black's presentation of the paper and sent it along to Larry with a note saying "This must be a good idea; Smalltalkers are thinking about it too!"

                That makes Perl 6 even more innovative than I was previously trying to demonstrate. Are there any other areas of Perl 6 (other than Rules, for regular expressions were always cutting-edge

    • Please let us all keep in mind that only three years ago Parrot [parrotcode.org] was merely an April Fool's joke (and quite brilliant at that). See the original Perl and Python Announce Joint Development [perl.org] press release on use Perl, the interview with Larry Wall and Guido van Rossum [perl.com] on Perl.com and the O'Reilly book announcement: Programming Parrot in a Nutshell [oreilly.com] by Guido van Rossum and Larry Wall. Does anyone remember the Perl + Python = Parrot [slashdot.org] Slashdot story? I am sure that back then absolutely no one was expecting that it m
  • oh happy day :) (Score:3, Interesting)

    by Ender Ryan ( 79406 ) on Saturday April 17, 2004 @01:08PM (#8892123) Journal
    Class declarations may be either file scoped or block scoped. A file-scoped declaration must be the first thing in the file, and looks like this:

    class Dog is Mammal;
    has Limb @.paws;
    method walk () { .paws».move() }

    Yay! I absolutely _hate_ having to have an extra set of braces around everything in an entire file. I have always enjoyed the way packages, and now clases, in perl are scoped.

    I know, seems like such a tiny thing, but dammit, I like to be able to go a bit further before hitting the right margin :) Especially in a language like Perl, with such compact code, lines tend to be pretty long sometimes.

  • by moof1138 ( 215921 ) on Saturday April 17, 2004 @01:33PM (#8892257)
    The whole doc is really fascinating, and full of witty Larry Wallisms, but for those who don't read it all the way through to the last page, the Apocalypse ends with a 'Optional Mandatory Cross-Disciplinary Joke for People Tired of Dogs' section:


    Biologist: What's worse than being chased by a Velociraptor?
    Physicist: Obviously, being chased by an Acceloraptor.



    Followed by a 'Future Directions' section:

    Away from Acceloraptors, obviously.


    Larry Wall is so cool.
  • Dot verus arrow (Score:4, Insightful)

    by JusTyler ( 707210 ) on Saturday April 17, 2004 @02:28PM (#8892569) Homepage
    The use of arrow where most of the rest of the world uses dot was confusing.

    Perl has always done things in a way that someone thought was 'right' when they coded it, and which isn't necessarily based on standards. I would contest that everyone else was doing it wrong here, and that the arrow makes way more sense, as it implies hierarchy, whereas a dot does not.
    • Re:Dot verus arrow (Score:2, Insightful)

      by chromatic ( 9471 )

      True, the arrow does have a nice visual effect. Of course, it's also two characters compared to one -- and it's nice to make common things short and sweet.

    • What confuses me is the direction of the arrow. The notation

      my $point = Point.new(x => 2, y => 3);

      just sort of reads wrong to my eye. Writing

      x <= 2

      is easier (again, for my eye), perhaps because it echoes other languages (perhaps a bad criterion), and mathematical notation (probably a good criterion).

      I'm sure there is a way to visualize this syntax, but as it's written, it looks to be storing the value of x in the container 2.

      PS. I should note that I've never used the OO aspects of p

  • Excuse me but I believe this story should be on the front page, should it not? I am sure everyone will agree with me. We all have been waiting for that Apocalypse for over a year now (since March 7, 2003, to be precise). Furthermore, this is undoubtedly one of the most important Apocalypses. Am I the only one who thinks that the future of computing as we know it is at least a little bit more important than some satellite TV pirates or the daily SCO Stock update? I believe this story was not posted on the fr

Quantity is no substitute for quality, but its the only one we've got.

Working...