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...).'"
Many Informative Links (Score:5, Informative)
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:
(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)
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
No switching between $, @ and % (Score:5, Informative)
The changes proposed for Perl 6 means no switching between $, @ and % any more.
Re:Perl6 is a mistake (Score:1)
Troll feeding (Score:4, Informative)
It shows up in most of the Perl 6 stories.
Re:Perl6 is a mistake (Score:1, Insightful)
Common Lisp. Enough Said. Okay maybe Scheme, if you're a bit of a masochist...
Everyone is Right (Score:3, Informative)
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
Re:Everyone is Right (Score:2)
Slow Languages (Score:2, Interesting)
JVM is not exactly language-independent. It is not very well
Re:Slow Languages (Score:2)
I disagree. Any language which removes basic assumptions made by lower-level languages (e.g. that my int won't become a string when I'm not looking) will "slow" the language.
Perl 1..6 makes many tradeoffs which require that it be slower in execution than, for example, C. But that's not all bad. It gives you a level of semantic flexability that you don't have in those lower level languages. Granted, you pay for it, but I think the price is worth it.
As an example
You disagree? (Score:1)
You may disagree, but as far as I know, even though Perl 6 removes those very assumptions by default, one is still free to explicitely impose them nonetheless, is one not?
Re:You disagree? (Score:2)
Really? (Score:1)
Really? I thought that the whole point of integer registers in Parrot was to not use PMCs (and the overhead thereof) for integer (and floating point, for that matter) computations, wasn't it? Aren't vtables used for PMCs only? Otherwise I wouldn't see much point in having separate sets of registers and in fact
Re:Really? (Score:2)
Integer, string, and float registers are really for internal use by compilers. Anything that you expose to the user as a variable is going to have to go in a PMC. While it might be shadowed in an int register for performance, in most cases you won't be able to avoid the allocation of a PMC. At least that was Dan's take at the talk he gave on Parrot internals.
It's nice to say "this is just an int, I can tell that by looking a
Larry Wall? (Score:1)
You mean Larry Wall? I didn't know he reads my posts... Thanks, Larry!
Re:Larry Wall? (Score:2)
Re:Perl6 is a mistake (Score:2)
Have you read A12 yet? It's not as bad as you th
Flex Link (Score:2, Informative)
Looks like progress to me (Score:5, Insightful)
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.
Re: (Score:2)
Re:Multi Dimensional Arrays and Hashes (Score:2)
#!/usr/bin/perl -w
use strict;
my @array;
$array[6][4][2][5][6] = "whoa!";
print $array[6][4][2][5][6];
Re: (Score:3, Informative)
Manipulating Arrays of Arrays in Perl (Score:2, Informative)
See perldoc perllol: Manipulating Arrays of Arrays in Perl [perldoc.com].
Re:Multi Dimensional Arrays and Hashes (Score:1)
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
Re:Multi Dimensional Arrays and Hashes (Score:1)
> @_ 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)
OT: Haskell (Score:2)
Of course, I'm not disparaging Larry's work
Haskell -> Parrot (Score:1)
Haskell is very interesting indeed. And
Re:Haskell - Parrot (Score:2)
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)
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
Very True and Insightful (Score:1)
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
Re:Very True and Insightful (Score:1)
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!"
Interesting (Score:1)
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
Any examples? (Score:1)
Could you be more specific on which exactly innovative features are you missing in Perl 6? It is not too late to suggest them.
Interesting notes on Parrot (Score:1)
oh happy day :) (Score:3, Interesting)
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.
It does bode *very* well for Perl 6 (Score:3, Insightful)
As a matter of fact, it does bode well for Perl 6. Even very well, I might add. As Larry Wall has said in his famous State of the Onion speech on TPC4 [perl.com]: "Perl 5 was my rewrite of Perl. I want Perl 6 to be the community's rewrite of Perl and of the community." Also, please let me quote the first Apocalypse: "What I will be revealing in these columns will be the design of Perl 6. Or more accurately, the begin
Re:It does bode *very* well for Perl 6 (Score:1)
Re:It does bode *very* well for Perl 6 (Score:2)
Optional Mandatory Cross-Disciplinary Joke (Score:5, Funny)
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)
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)
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.
arrow direction confusing (Score:2)
just sort of reads wrong to my eye. Writing
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
Re:arrow direction confusing (Score:1)
$x = new Whatever;
$x->doSomething();
But thanks for bringing that other point up, you're on the money.
Re:arrow direction confusing (Score:2)
my Point $p
%reserved_words> = 1;
Why is this story not on the front page? (Score:2, Redundant)
What a Shame... (Score:1)
The long awaited Apocalypse 12 finally gets published and what we as a Slashdot community are doing? We completely ignore it and post a story about some God damned satellite TV pirates [slashdot.org], a stupid 419er Lost in Space [slashdot.org], the daily SCO Stock update and literally dozens of absolutely unimportant stories on the front page instead! We even ask "Is Experience in Programming Worth Anything?" [slashdot.org] on the same day and than we completely fail to help people get said experience. Meanwhile on Perl6-Language [google.com] mailing list:
A [google.com]