Slashdot Mirror


First Perl 6 Book is Out

prostoalex writes "O'Reilly Publishing presented Perl 6 Essentials, the first book to be dedicated to Perl 6, at the beginning of this month. Looking at the table of contents, it hardly looks like a valid replacement for Llama or Camel books. Chapter 1 is available online. The whole book is available to Safari subscribers." I'm sure we'll review it sooner or later.

8 of 75 comments (clear)

  1. PERL is dying! by Anonymous Coward · · Score: 3, Funny

    PERL is dying, just like BSD. That is why no one is posting on this thread.

  2. Perl 6 is a mistake. by Anonymous Coward · · Score: 4, Insightful
    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 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, 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).

    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 -- it seems that Larry, in his infinite wisdom, wants to prefix every data type with a different hard-to-type character. Perl was only designed for the three data types, and adding more is a mess.

    Perl 6 is a complete rewrite, but it keeps all the mess which has accumulated over the previous versions. This is not good. Sure, my const int $var = 27; may look neat (in the same way that, say, Pascal does), but $var isn't entirely constant, or entirely an integer, it's just a hack which makes it sort of behave like one. The whole thing is an exercise in pseudo-computer science masturbation with little real purpose except to please the managers who dislike the one thing that makes Perl special.

    On a similar note is regexes. I'm an avid fan of regular expressions simply because a nondeterministic finite automata is far more flexible than linear code. However, Larry must have been smoking that cheap $2 crack when he wrote this. Does he want Perl 6 to be flex or something?

    I won't be going on to use 6. It's a nice idea, but it's completely unnecessary. It won't make large projects any easier to manage (the language is still, at heart, an almighty hack -- an impressive one, but still a hack). It won't make OO any cleaner. It won't make development any faster. To put it bluntly, Perl scripts will still look less beautiful than our friend Mr Goatse. I'd prefer to use a language which has always been pure synthesis of science and engineering, not some half-baked imposter.

    Perl 6 will be nice, but I'm guessing it will be the end of Perl. It can't do what it wants to do whilst still being based upon a nasty mess. There are now other options, which provide all of Perl's power and none of the mess. Sorry, but *BSD ^H^H^H^H Perl is dying. Larry is buggering it up the ass without lubricants, just like Shoeboy is doing to Larry's daughter.

    1. Re:Perl 6 is a mistake. by vcv · · Score: 3, Interesting

      >> Sure, my const int $var = 27; may look neat (in the same way that, say, Pascal [lysator.liu.se] does), but $var isn't entirely constant, or entirely an integer, it's just a hack which makes it sort of behave like one. The whole thing is an exercise in pseudo-computer science masturbation with little real purpose except to please the managers who dislike the one thing that makes Perl special.

      The reason for this is because if you tell the interpreter what sort of data it is, it helps the interpreter do more optimizations with that data. Sure, it's not truly an integer, but at least you're helping the interpreter out but telling it how it can deal with the data.

      >> Perl 6 is a complete rewrite, but it keeps all the mess which has accumulated over the previous versions.

      Of course, there is a lot of features in Perl. 200 ways to do one thing (which couldnt be considered a bad thing), but it's actually really cool, because it lets you stick to your own style more than other languages. Face it, perl should not be used unless you know what you are doing with it. It can get ugly, but it's powerful and can do certain tasks amazingly well, and better than any other language.

      Sure, it's bloated.. but the way it's being designed should make it so the bloat doesn't affect the speed or power.

      And you won't truly be able to appreciate Perl (especially 6), until you learn all the shortcuts [features] (not all, but..) . There is a lot to learn about the language before utilizing it's full power, but once you master it (if possible with perl), it becomes really fun.

  3. not *intended* to replace the camel book by josephgrossberg · · Score: 5, Informative

    "it hardly looks like a valid replacement for Llama or Camel books"

    It's not supposed to be. Just as they have conventions for the books' color (e.g. Perl blue), O'Reilly and Associates has conventions for the titles.

    * "... Essentials" means an overview of what's new.
    * "Learning ..." is a discussion and tutorial on a topic, intended for beginners
    * "Programming ..." is the same, but for intermediate and advanced users
    * "... Cookbook" is a series of problems and their solutions
    * "... in a Nutshell" is like a language reference
    * "...: The Definitive Guide" is a combination of all four
    * "... Pocket Reference" is a shorter version of the above

    1. Re:not *intended* to replace the camel book by ClosedSource · · Score: 3, Insightful

      You forgot ".. Annoyances" which is purchased by people who don't use the product described in the book.

  4. Re:Ruby has its own design mistakes by SewersOfRivendell · · Score: 4, Informative
    I'd move to Ruby right now, except it doesn't support Unicode

    That's not a "design mistake", it's just a major feature that hasn't been added yet. This will be remedied in a future version of Ruby.

    A "design mistake" would be something error-prone and impossible to fix, like Python using indentation as part of the syntax.

  5. Re:Ruby has its own design mistakes by AceMarkE · · Score: 4, Informative
    Actually, I believe that as long as all the lines at a given level are indented the same, the actual amount of indenting is irrelevant. Example:
    for(1):
    for(2): # indented two spaces
    for(3): # indented five spaces
    for(4): # same as for(2)
    for(5): # note different than for(3)
    The accepted standard is 4 spaces per indent. And really, most programmers tend to write something similar anyway, Python just forces you to at least make an attempt at making the code readable.

    Mark Erikson
  6. Re:Ruby has its own design mistakes by metamatic · · Score: 3, Insightful

    That's the problem, though. There's no such thing as "standard" tabs.

    --
    GCHQ Quantum Insert installed. If only our tongues were made of glass, how much more careful we would be when we speak