Journal Pan T. Hose's Journal: Larry Wall's Apocalypse 12: OO in Perl 6 4
The long awaited Apocalypse 12 by Larry Wall has been just announced by chromatic on perl6-language mailing list. It is one of the most important documents explaining the Perl 6 language design. (All of the previous design decisions are available as Apocalypses by Larry Wall, Exegeses by Damian Conway and Synopses 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.
Table of contents:
Some of the Problems with Perl 5 OO
- A little too orthogonal
- Not quite orthogonal enough
- Forced non-encapsulation
- A little too minimal
- Too much keyword reuse
- Too difficult to capture metadata
- Inside-out interfaces
- Not enough convention
- Wrong conventions
- Everything possible, but difficult
- Generating class by running code at compile time
- There are many roads to polymorphism
- People using a class shouldn't have to think hard
Trust in Convention, But Keep Your Powder Dry
- Single dispatch
- Calling superclasses, and not-so-superclasses
- Parallel dispatch
- WALKCLASS and WALKMETH caching
- Declaration of multiple dispatch routines
- Calling via multiple dispatch
- Meaning of "next METHOD"
- Making fiends, er, friends
- Wildcard delegation
- Renaming delegated methods
- Delegation without an attribute
- Delegation of handlers
- Hash-based redispatch
- Relationship to roles
- Anonymous delegation for ISA emulation
- Exportation
- The gather/take construct
-
- Special quoting of identifiers inside curlies going away
- Vector operators renamed back to "hyper" operators
- Unary hyper operators now use one quote rather than two
- $thumb.twiddle no longer requires parens when interpolated
- The =:= identity operator
- New grammatical categories
- Assignment to state variable declaration now does "first" semantics
- The length() function is gone
- String positions
- The new "&" separator in Regexen
Optional Mandatory Cross-Disciplinary Joke for People Tired of Dogs
You can access the entire document as a print friendly version. The standard version of Apocalypse 12 is divided into 20 parts. Enjoy.
If you are new to Perl 6 and Parrot, then Perl 6 Essentials by Allison Randal, Dan Sugalski and Leopold Tötsch might be a great introduction. The second edition should be published soon.
Slashdot story submitted on 11:14 Saturday 17 April 2004 UTC. Pending...
Rejected (Score:1)
Reposted (Score:1)
Rejected ... (Score:2)
Very Disappointing (Score:1)
There must have been several submissions indeed and they have apparently chosen one [slashdot.org] which was not only posted five hours later but was also in every way inferior to mine [slashdot.org]. The reasons of that decision remain unclear. But even though my story has been so foolishly rejected, I still managed to post three out of four Score:5 comments including (but not limited to) one First Post [slashdot.org] while getti