Slashdot Mirror


Perl 6 Essentials

JayBonci writes "It may come as a surprise that within the pages of 'Perl 6 Essentials' lies what could be two books, despite its length. If not for lack of cover space, it could easily bear the names "Perl6 for Perl5 programmers" and "Parrot in a Nutshell". Both topics are concise and clearly covered, despite their relatively different audience." Read on for the rest of Jay's review. Perl 6 Essentials author Allison Randal, Dan Sugalski, and Leopold Totsch pages 208 publisher O'Reilly rating 9 reviewer Jay Bonci ISBN 0596004990 summary A solid look ahead at Perl 6, and a reference for Parrot developers

Make no mistake, Perl 6 isn't here yet, but it's coming. The book starts with a good explanation of "the plan"; chapters 1-3 deal with the history, goals, and design considerations of the project. It's a good conceptual overview of the process about how it has been run so far, and how it seems to be continuing. Chapter 3 is of special interest, as it showcases some of the in-depth thought that has been poured into the project. Though we all aren't language theorists, it helps allay some of the fears that change brings while being completely fascinating reading.

This first part of the book isn't very useful without a fairly solid Perl 5 background. It wastes no time in chapter 4 discussing syntactical differences in the v5 to v6 transition. Programmers should be pleased with the practicality of the approach to the new language, as it refers to the new structures and features, and how they solve simple workarounds that Perl veterans are used to in Perl 5. Currying, multimethods, class definitions and structures, new operator syntax, and the dynamics of the new regular expression engine (now called rules) are all touched on, and their values made obvious to the reader.

The last three chapters are for those interested in Parrot development and those who wish to port languages to Parrot. (There are active projects to port Python, Ruby, and even .NET to Parrot.) The section has a slight perl slant to it, but is really about the interpreter and compiling / running Parrot code. It is a fairly complete reference to the different parts of PASM (Parrot Assembly Language), and its role in porting languages to use Parrot. A comfort with assembly language basics is assumed in these sections, as the syntax and concepts of registers and machine code are made easier with general assembler familiarity. This part was somewhat dry for me, as it reads more like a reference than anything else, but it covers the topic fully without droning or leaving anything out. Examples are abundant and range from the simple, to the integrated, and are enough to get people started programming and writing tests with Parrot bytecode.

It should be noted that this book is valid and accurate now, but any development project can make changes quickly. There are places where the authors have admitted that a feature isn't in stone, and is possible to change. According to chromatic, an editor for O'Reilly, the plan is to update the book once a year until Perl 6 is released. Until then, a great place to keep up to date for the casual observer is at the p6p digest. This book goes down a lot easier than the Apocalypses, RFCs, and Exegeses, and I'd heavily suggest it to anyone who is serious about being ready for 6 or joining in on development . I preordered it from Amazon when I saw it was coming out, and am quite happy with my investment.

Table of Contents
  1. Project Overview
    • The Birth of Perl 6
    • In the Beginning . . .
    • The Continuing Mission
  2. Project Development
    • Language Development
    • Parrot Development
  3. Design Philosophy
    • Linguistic and Cognitive Considerations
    • Architectural Considerations
  4. Syntax
    • Variables
    • Operators
    • Control Structures
    • Subroutines
    • Classes and Objects
    • Grammars and Rules
  5. Parrot Internals
    • Core Design Principles
    • Parrot's Architecture
    • The Interpreter
    • I/O, Events, Signals, and Threads
    • Objects
    • Advanced Features
    • Conclusion
  6. Parrot Assembly Language
    • Getting Started
    • Basics
    • Working with PMCs
    • Flow Control
    • Stacks and Register Frames
    • Lexicals and Globals
    • Subroutines
    • Writing Tests
    • PASM Quick Reference
  7. The Intermediate Code Compiler
    • Getting Started
    • Basics
    • Flow Control
    • Subroutines
    • IMCC Command-Line Options
    • IMCC Quick Reference

You can purchase Perl 6 Essentials from bn.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.

1 of 172 comments (clear)

  1. Off Topic but figure I would ask your perl guys... by DigitalCH · · Score: 0, Offtopic

    Can someone tell me if there is a perl to java code converter out there? Open source or proprietary is fine....

    If not can someone tell me what the difficulty in writing one would be?