Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
Author: Scott Walters
Published by: Apress

This book will show you how to start writing Perl 6 code, well, now. The example scripts are written in Perl 5, Perl 6 and some that are a combination of the two. The author guides you through creating variables and accessing the data in them. You will find out how to save memory by only using the OO variable types when you need them. You will see first hand how to use the new switch statement and the cool new blocks (KEEP{}, UNDO{} and CATCH{}) all before you have made it halfway through the book.

Part One - Basics, Data Flow, and Program Flow contains the first three chapters and is the worst part of the book in my opinion. In the introduction, Scott says that "the primary audience is Perl 5 programmers who are curious (and in many cases, anxious) about Perl 6." Because of this, the first chapter felt totally out of place in this book. The information leading up to the section on "Getting and Building Perl" could have been put into a new chapter with some of the information from the extremely long introduction (twelve pages). The rest of the chapter ("Getting and Building Perl", "Installing Modules", "Datatypes") should have summed up in a sentence or two at the end of the introduction with links to relevant information. The second chapter is a pleasant read that covers the basics such as the language specifications and implementation, Parrot and PONIE. (Pugs is not mentioned because the book went to press before its inception.) Chapter three is supposed to be about stricture but it covers much more than that. The latter part of the chapter discusses things that usually go hand in hand with strictures but are really outside of the scope of strictures: warnings, "Avoid Reinventing Wheels" and security concerns. These extra topics could have been given a chapter of their own and explained in more detail with an eye on how to do it in Perl 6.

Part Two - Variables, Arrays, and Control Structures covers the gamut from constants, the basic data types, variables, and operators all the way to subroutines, blocks and the new switch statement. You'll see how to create and use the various data structures in Perl 6 with equivalent Perl 5 code to help you understand it all. Most of the information will be familiar but some things have changed in Perl 6 (accessing an array element for example).

The five chapters in Part Three - Threads and Objects discuss CPAN Modules, Objects, Exceptions, Type Safety and Multithreading. The chapter on modules will be a rehash of information for anyone who's been using Perl 5 for a while. Objects not only shows you how to create objects but explains the new "object context" as well as attributes, properties and roles. The chapter on exceptions is no exception; there are plenty of code examples to help you understand the new Perl 6 exception objects. Readers will want to pay close attention to the multithreading chapter; while threads are available in Perl 5, they are not exactly usable.

The last part of the book is not intended for Perl initiates; the chapter titles are Any and All, Lexical Closures, Continuations and Coroutines. Chapter 18 explains how Perl 6 has added the any(), all() and one() functions as well as the | (any) and & (all) operators and how you can use them. The chapter on closures shows you a new way to create a closure and explains closures in great detail. Continuations and coroutines are new in the Perl 6 core but their chapters only have Perl 5 examples using the Coro modules.

Overall, I rate this book 8 out of 10. If you haven't been following the Apocolypses and Exegeses, then this will definitely get you up to speed on Perl 6.

 

I would like to give a special thanks to diotalevi and erix for providing feedback prior to this being posted.


In reply to Perl 6 Now: The Core Ideas Illustrated with Perl 5 by Mr. Muskrat

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others taking refuge in the Monastery: (4)
    As of 2020-12-02 04:02 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?
      How often do you use taint mode?





      Results (28 votes). Check out past polls.

      Notices?