Follow Slashdot blog updates by subscribing to our blog RSS feed

 



Forgot your password?
typodupeerror

Perl's State of the Onion 10 126

Posted by CowboyNeal
from the that-time-of-year dept.
chromatic writes "Larry Wall's annual State of the Onion addresses cover subjects such chemistry, science, music, lingustics, and screensavers. They occasionally discuss Perl too. This year's, State of the Onion 10 compares raising children into productive adults to guiding the development and design of a programming language. Perl turns 19 soon; Larry says that she'll truly grow up with Perl 6."
This discussion has been archived. No new comments can be posted.

Perl's State of the Onion 10

Comments Filter:
  • by Qa1 (592969) on Friday September 29, 2006 @02:09AM (#16242027)
    Perl turns 19 soon; Larry says that she'll truly grow up with Perl 6.

    Great, so Perl 6 is legal now. Any chance of seeing her while we still have our youth?

    • by Anonymous Coward on Friday September 29, 2006 @02:31AM (#16242111)
      Perl just turned legal? Great. Perl has been fucking me for the last 10 years, and now I hear this. Honestly, Larry told me that she was 35! I didn't know.
    • by RuBLed (995686)
      It's like a SIMONE [imdb.com] thing. Besides do you think Larry would do that favor for slashdotters considering our current reputation of... oh nevermind...
  • Summary (Score:3, Interesting)

    by kestasjk (933987) on Friday September 29, 2006 @02:39AM (#16242147) Homepage
    An interesting and fun read, it lists and explains the challenges being faced with Perl 6 very well. Unfortunately it doesn't explain how Perl 6 will respond to those challenges; just that Perl 6 will be WOP (whatever oriented programming), which is more than a little vague.

    After having read it I get the feeling Perl 6 is having an identity crisis, but that Wall knows what he's doing.
    • Re:Summary (Score:4, Informative)

      by Scarblac (122480) <slashdot@gerlich.nl> on Friday September 29, 2006 @03:35AM (#16242367) Homepage

      To know what Perl 6 will be like, read the Synopses [perl.org].

      My own reaction was more like, wow this guy really is nuts, but I really want to see what he'll manage to come up with. :-) (and I say that as a professional Perl programmer...)

    • Re: (Score:3, Insightful)

      by NickFortune (613926)
      I was disappointed. Larry usually does a better job of connecting the off topic stuff pack to Perl. This time he had maybe five or six puns and that was about it. The main thing I took away from it was the big slides with whatever. That and the theme of "learning not to care"

      It all read to me as if he's disengaging himself from the Perl development process and looking forward to spending more time on Real Life. Good luck to him, if so; he's surely earned some time off to spend with his family.

      Pity abou

    • Re: Summary (Score:2, Insightful)

      by jonadab (583620)
      > Unfortunately it doesn't explain how Perl 6 will respond to those challenges;
      > just that Perl 6 will be WOP (whatever oriented programming), which is more
      > than a little vague.

      Ah. What you've missed is that this is Larry's State of the Onion speech. If you want to see details such as how Perl6 will respond to certain challenges, what paradigms the language supports and how it supports them, and so on, you subscribe to the mailing lists or at least read the Synopses. If you just want to be ente
  • by Ed Avis (5917) <ed@membled.com> on Friday September 29, 2006 @03:22AM (#16242301) Homepage
    You can start programming in Perl 6 today using Pugs [pugscode.org].
    • by Billosaur (927319) *

      As a Perl programmer, I have to ask: why? I don't want Pugs, I want Perl 6! The last thing I need is another language to clutter things up. I'm not going to go about converting Perl 5 scripts to Pugs then having to convert them over to Perl 6. Or is LW going to wave a magic wand one day and Pugs will magically transmogrify into Perl 6? I love Perl, I really do -- it's the Swiss Army knife of languages, good for just about anything you can think of. Whether there is a Perl 6 in the future is really irrelevan

      • by Abcd1234 (188840)
        Umm... what? Pugs is an attempt at a reference implementation of... Perl 6. If you write code and it runs in Pugs, then it should run in any other Perl 6 implementation. Unless, that is, I'm missing something...
      • by dkf (304284)
        I've also always regarded Perl as the swiss [swissarmy.com] army [wenger-knife.ch] knife [swissarmy.com] of scripting languages too.
      • by arodland (127775)
        Your statement is akin to "I don't want gcc! I want C! You expect me to write my programs for this free gcc crap? What, will RMS just wave a wand someday and gcc will be C?"
  • by VGPowerlord (621254) on Friday September 29, 2006 @03:34AM (#16242365)
    Perl 6 may be great. However, having read some of the docs, I don't think so.

    For example, here's two choice quotes from the Perl 6 operators [perl.org] page.
    • -> becomes ., like the rest of the world uses.
    • The ? : conditional operator becomes ?? !!.

    Hypocrisy in action, folks.
    • by bytesex (112972)
      -> becomes ., like the rest of the world uses.

      I don't get it - the rest of the world doesn't use C or C++ ? Is that what you're saying ?
      • by revlayle (964221)
        only for a pointer to a class instance/struct. for straight up heap-based class and struct expressions... we still use "."... a LOT
        • by bytesex (112972)
          Well I can be just as pedantic as you if you will; stack-based 'structs' (perl arrays and hashes) don't use dots at all; they're indexed by [] and {}, respectively. 'heap-based' structs (pointers) _do_ use '->' and are mirrored perfectly adequately in perl with the use of the same operator for references. So there.
      • by osgeek (239988)
        He's saying that they're changing one bit of syntax to conform with what people are used to in other languages while totally corrupting something else that was perfectly consistent with what everyone else already knew.
    • by grinder (825) on Friday September 29, 2006 @07:42AM (#16243541) Homepage
      Hypocricy? I don't think this word means what you think it means. Could you explain what you think is so hypocritical about this design decision?

      From what I understand, the Perl6 operators were chosen according to Huffman compression principles. Frequently used operators became shorter, less frequently used operators became longer.

      The bare colon operator turned out to be much more useful elsewhere. The dash-arrow operator was initially borrowed from C++, but these days, most dynamic languages all use dot for the same purpose.

      This sound more like pragmatism than anything else.
      • by Scaba (183684)
        Hypocricy? I don't think this word means what you think it means.

        Hypocrisy? I don't think this word is spelled like you think it's spelled.

      • The Merriam-Webster definition for hypocrite [m-w.com] puts it best:

        a person who acts in contradiction to his or her stated beliefs or feelings"

        i.e. saying "-> becomes ., like the rest of the world uses." and then changing the ternary operator from something everyone else uses to something completely different.

        Changing -> to . has other repercussions, too. In case you'd forgotten, "." was already used for concatenation. So, now concatenation now becomes "~". But wait, ~ was already used to bind scalars to a p

        • by chromatic (9471)
          It also strikes me as a really stupid idea to arbitrarily change operators...

          Good thing it's not arbitrary then.

          • 3 a : based on or determined by individual preference or convenience rather than by necessity or the intrinsic nature of something
            So, yes, arbitrary [m-w.com].
            • by chromatic (9471)

              Fine, but by that definition everything in the design a programming language is arbitrary, so that's a fairly useless description. I thought you meant the capricious or random definition, which (while incorrect in this case) actually means something in context.

    • > The ? : conditional operator becomes ?? !!.
      > Hypocrisy in action, folks.

      I agree. The new ternary syntax is going to be easily confused with the ORLY?? and OMG!! operators.
    • by CTachyon (412849)

      To quote Larry in Apocalypse 3 [perl.com]:

      The basic problem is that the old ?: operator wastes two very useful single characters for an operator that is not used often enough to justify the waste of two characters. It's bad Huffman coding, in other words. Every proposed use of colon in the RFCs conflicted with the ?: operator. I think that says something.

      If you haven't been keeping up, one of Larry's basic premises in Perl 6 is to improve the "Huffman coding [wikipedia.org]" of the language: things that people use every day shoul

  • Larry is boring (Score:2, Interesting)

    by Eivind (15695)
    Larry Wall is just boring.

    He tries desperately hard to be creative, funny, surprising, to add new perspectives.

    Yet, when it comes down to it, he ultimately writes 5 pages of nonsense. He really does say amazingly close to nothing in all those pages. No. A large white square with the literal text "Whatever" in the middle doesn't really tell anyone anything significant.

    And no. The skills needed for successfully managing a family and raising children doesn't, infact, have much in common with those skills

    • Re: (Score:2, Insightful)

      by melonman (608440)

      The large square panels are presumably slides from his live presentation. They aren't supposed to stand alone, in fact I suspect that the whole presentation would make (as much) sense without any of them.

      Personally, I find Wall's prose simply wonderful: I've been known to read entire chapters of the Camel book just for the asides. I think that to judge this presentation you have to imagine the equivalent speech about "the future of typing in C++" or "the evolution of the object model in java" and ask yours

    • Come on: "Here's a mommy and a daddy truck. They live on a truck farm, and raise little trucks." You don't think this is adorably funny.

      Anyways, I'm sure Perl is also quite happy that you left.

    • Re: (Score:3, Interesting)

      by mrsbrisby (60242)

      I become happier that I left Perl for good several years ago.

      We're glad you stopped programming.

      And no. The skills needed for successfully managing a family and raising children doesn't, infact, have much in common with those skills needed to develop and maintain a programming-language.

      I think programmers understood that he wasn't suggesting otherwise.

      See, there are a lot of programmers (especially those that learned in the last 5 years, but plenty still that have been working in software development for lo

  • Debugging (Score:3, Informative)

    by cerberusss (660701) on Friday September 29, 2006 @05:13AM (#16242691) Homepage Journal
    What I would really REALLY like to come with Perl isn't about the language itself, but about the tools.

    Perl has a really nice debugger, but you can't use it for debugging scripted web pages. There are solutions, but mostly they're not provided with the standard Linux distributions. I'd like some sort of online solution that doesn't require lots of configuration.
  • It's really touching, all that stuff about raising a family that he goes into, but (while Heidi might be strangely attractive) does he realise how ugly his kids might be? Course not, he's a father.

    Honestly, if I plugged my mouse into the keyboard port and spat the input into a text editor, it'd look like Perl. I know that's an incredibly immature way of looking at a language but, dammit, even Assembly is prettier! Should that really be the case?

    (Disclaimer: this is not a comment on Perl's functionality.)

  • Podcast (Score:4, Funny)

    by cerberusss (660701) on Friday September 29, 2006 @05:39AM (#16242819) Homepage Journal
    This is all nice, but where's the podcast?
  • Operator Error (Score:4, Interesting)

    by Killer Eye (3711) on Friday September 29, 2006 @05:45AM (#16242845)
    While indeed Perl operators are becoming more "consistent" among themselves, I think Perl's decision to undefine decades-old comforts like the ternary operator (?:) and bit shifting () is a huge mistake. If a language wants to change these things, the results should be clearly *more* intuitive, not just different. Take Python, which recently added the following style of ternary operator: "x = 1 if cond else 2". Yes, it's not "?:", but to me it's a lot easier to understand than the equivalent Perl operator. The fact that Python was able to add a feature by reusing keywords is even better.

    Some Perl 6 additions will prove quite useful, like the zip() function (which Python has had for some time, incidentally). Some changes are moderately useful, but it is difficult to see how they are superior to Perl 5 (like getting rid of the "_" short-cut for stat calls in favor of sequencing calls). But a lot of the stuff just doesn't seem to warrant all the effort to change scripts: programmer time is expensive, and is wasted twiddling ASCII characters just because the language wants to use new characters to express *exactly the same concept*.

    In my case, I will probably look at my array of Perl scripts, and I will probably decide it is easier to finally switch them over to Python or another superior language. At least then, I will gain something for my trouble.
    • by TheLink (130905)
      I'm actually waiting for parrot and ponie, not perl6. Then hopefully perl5 will run faster.

      Unfortunately ponie seems to have got stuck or something.

      Then if there are some things that perl5 doesn't do well, maybe you switch to perl6.

      Or python ;).
    • by Abcd1234 (188840)
      While indeed Perl operators are becoming more "consistent" among themselves, I think Perl's decision to undefine decades-old comforts like the ternary operator (?:) and bit shifting () is a huge mistake. If a language wants to change these things, the results should be clearly *more* intuitive, not just different.

      Well, to play devils advocate, how often do you find yourself using the terniary operator or bitshifting in Perl? What if you could, instead, leverage those tokens for other, more commonly used op
  • Death Valley (Score:3, Insightful)

    by kahei (466208) on Friday September 29, 2006 @05:54AM (#16242895) Homepage

    There's a certain stage, for some projects, at which people realize that the Great Next Version, if it ever comes, will be too little too late, and that the action has moved elsewhere. For Perl that was 3-5 years ago. For Ruby, 2-4 years ago. For countless non-public projects, it happens; gradually, progress meetings become a bit of a joke, the smart staff get moved elsewhere, and Project Star (there's nearly always a project called 'Star') becomes something that still exists on someone's budget, but which nobody really expects to have to pay attention to. Sometimes there's a meeting about it and a status report tha reads like a State of the Onion; a bit of waffle, a few in-jokes, some words of encouragement, and then back to doing something else.

    Sometimes, this does _not_ happen. Vista (which by rights should have entered the Death Valley last year) and Java (which should have entered it after 1.2) manage to escape this fate; disappointment after disappointment they somehow stay in the spotlight, stay relevant in hearts and minds.

    The question is what to do with a project in Death Valley. In a company, someone usually eventually rolls out _something_ and declares victory so that everyone can forget about it. In open source, though, they _never_ administer the final blow. Look at CVS -- it's been in Death Valley for so long, people are beginning to think that _Subversion_ is old hat! Sure, people _use_ it, if they haven't moved on to something else yet, but the last interesting CVS news item was probably in the late 90s... and yet it jogs along... and now Perl jogs along beside it, in the gated retirement community of Open Source.

    I'm not saying it's a bad thing, but it is a definite difference between OS and commercial software; you get far more resources spent on the 'long tail' of a project's life in OS.

    • Re: (Score:2, Interesting)

      by 6031769 (829845)
      I agree with you entirely that the longer the "Next Great Version" takes the less will be the interest when it finally arrives, and that's generally a truism as well as applying specifically in this case.

      What differs with Perl is that Perl5 is such a good language (for those who actually use it) that its use and development will probably continue apace (as they have during this whole Perl6 dev cycle). I really like Perl, but the Perl I like is Perl5. By trying to turn it into an "all things to all people" l
    • Re:Death Valley (Score:4, Insightful)

      by Anonymous Brave Guy (457657) on Friday September 29, 2006 @07:41AM (#16243533)

      You seem to equate a project that is no longer being significantly or quickly developed with a project that is pointless. Some of us would call tools like Perl 5 and CVS "tried and tested", "stable and reliable", or perhaps even "established standards".

      Now, me, I've followed Perl 6 development from a safe distance, reading the odd article here and there, but not spending too much time on all the details. I get the feeling that it's going to be too complicated to be worth the effort to switch, but I'll reserve judgement until there's a stable, polished implementation to experiment with.

      However, that didn't stop me using Perl 5 to develop a whole load of scripts to drive a new database system I was writing last weekend, or for that matter to write a couple of 50-liners to process some diagnostic output from the app I'm developing at work yesterday. I don't care that I didn't use the latest AJAXified web 2.0 technologies; I had a job to do, and Perl 5 let me do it quickly and correctly, which is all I ask of a programming tool.

      Incidentally, if Perl had its day 3-5 years ago, and Ruby 2-4 years ago, what do you think are the cutting edge programming languages of today?

      • by edremy (36408)

        Incidentally, if Perl had its day 3-5 years ago, and Ruby 2-4 years ago, what do you think are the cutting edge programming languages of today?

        Visual Age COBOL [flexus.com] Get with the times man- everything old is new again.

      • by kahei (466208)

        Hm, well, I don't really like cutting edge things, because I'm very lazy, and because so many things go from 'cutting edge' to 'dead' with no in-between. But in terms of where the interesting effort is going, I personally tend to think:

        PHP -- I know, I know. But there's a great deal of interesting webby work happening in it, especially if you like CMSes / knowledge sharing tools.

        C# -- Tons of stuff going on, a very powerful platform that is only just beginning to be explored, and then of course the fact t
      • Re: (Score:3, Informative)

        by 0xABADC0DA (867955)
        Smalltalk and LISP, obviously. Like Merlin, they were born fully formed and age backwards, getting more and more relevant as time passes.
    • by Abcd1234 (188840)
      This could also be related to good ol' Second-system Syndrome [wikipedia.org], of which I suspect Perl 6 is suffering, at least in part.
      • by arodland (127775)
        No, Perl 1-4 was the First System. Perl 5 is the Second System. Perl 6 is the Third System.
    • by mrsbrisby (60242)

      There's a certain stage, for some projects, at which people realize that the Great Next Version, if it ever comes, will be too little too late, and that the action has moved elsewhere.

      Maybe. But exactly how much time passed between perl4 and perl5? How about if we talk creation (i.e. the ability to create code in the respective languages)?

      It's amazing that people think we've been waiting for a while for Perl6. People have been writing in perl6 for a while, it just so happens that more still write in perl5.

    • I like your description of "the gated retirement community of open source." There are definitely some projects that seem to fade away. Sometimes this is because the developers move on, and sometimes progress just seems to grind to a halt.

      Don't underestimate the inertia of established technologies, though. Some people are still using some variant of FORTRAN, the original compiled language developed in the 50s. Other organizations got stuck at the COBOL stage. There's still a small market for VAX gurus, VMS p
  • This was a joking target in the development process for Perl6. It seems Larry will finally archive this goal even if he probably never intended. Larry changed Perl from 5 to 6 in a way too many people got sick and stayed with Perl5. Essentially there are now two distinct Perl dialects which will hamper it's success so there won't be a reason for passing the 2 time Pi limit.

    O. Wyss
  • by scottsk (781208) on Friday September 29, 2006 @06:36AM (#16243107) Homepage

    What Perl 6 needs, and I haven't seen yet, is a compelling reason to switch. It may be better under the covers, but Perl 5 works great from a user's perspective. In fact, I've been using 4 and 5 over the past decade and a half, since '91, to craft almost everything. It's part of my nervous system. I've internalized it.

    So why would I switch to Perl 6? I'm just not hearing compelling reasons other than they've randomly changed a bunch of stuff so what I know doesn't work anymore or isn't optimal. The installed base of Perl 5 users is Perl 6's biggest enemy.

    This would be like changing vi keys to make them conform to the CUA standard or Emacs - it might be progress, but people are used to vi qua vi in its historical form and don't want progress because the standard keys are in their nervous systems now.

    • by DG (989)
      I'm completely on board with this attitude.

      I **LOVE** Perl 5. It is, without question, the most useful and most powerful programming language I have ever encountered, and that includes C, C++, various assemblers, Pascal, FORTRAN, Java, REXX, Ada, Python... all the languages of the week. I keep coming back to perl because it is so damn useful and because it is so elegant (when used correctly - bad perl is really, really bad).

      My productivity would be a tenth what it is today if not for perl. I use it for ever
      • by Abcd1234 (188840)
        Actually, I think Perl6 will ultimately be a much better language in which to design large systems. It's object system is much more powerful (with Roles, which as I understand it act like a combination of interfaces and mixins), which will make it easier to build more modular software (P5's package system is useable, but let's face it, it's not particularly clean). Plus, things like optionally stricter typing and DBC-like functionality mean (hopefully) fewer bugs.

        Additionally, P6 expands Perl's functional
        • by chromatic (9471)
          ...with Roles, which as I understand it act like a combination of interfaces and mixins...

          That's not really it. Mixins and interfaces are cut-down, minimal, crippled implementations of roles. A role-based system offers both mixins and interfaces trivially, but mixins or interfaces offer poor emulations of roles. Does that make more sense?

        • by Raenex (947668)

          Actually, I think Perl6 will ultimately be a much better language in which to design large systems.

          The problem is that people who think that Perl is not good for designing large systems have long since moved on to other languages. People who think that Perl5 is great as is are not going to like the Perl6 features. So Perl6 ends up pleasing nobody.

          Perl5 serves a useful niche. I still reach for it when I want to code up something quick and dirty. The Perl development community should have focused

          • by chromatic (9471)

            The Perl development community should have...

            The Perl development community has welcomed patches for nearly 19 years now. I believe you forgot to preface your humble opinion with "In my humble opinion as a non-contributor and someone who has used the work of hundreds of contributors (who know much better than me and thus may very well be in very good positions to disagree with my humble opinion) for many years for free...."

            (Being one of those hundreds of contributors, I laugh when you say "simple" an

            • by Raenex (947668)
              I don't have humble opinions, and I don't avoid critiquing stuff even when I have not contributed. I'm sure you're no different.
              • by chromatic (9471)
                I'm sure you're no different.

                I'm willing to continueto earn the right to have people care about my opinions by producing code, patches, documentation, bug reports, test cases, articles, presentations, tutorials, and books.

                Pick one of those. Show us all how easy it is.

                • by Raenex (947668)
                  So, you've never critiqued a volunteer project without giving back?
                • by singollo (68472)
                  I have sympathy with this viewpoint, but committed contributers frequently get the kind of tunnel visions that make big picture criticism less likely.
                  • by chromatic (9471)

                    How frequent is it? I could come up with a whole article full of criticisms of Perl 5's design and implementation ( What is Perl 6 [perl.com] is a start). I wouldn't have seen everything Larry has seen, for example, but he's a lot better at designing languages than I am.

                    My experience is that a lot of project have wishlists with big and small items. Granted, the big items tend not to be radical rethinkings (as in the case of Perl 6), but I'm not sure it's as insular as you might think.

                    • Re: (Score:2, Interesting)

                      by singollo (68472)
                      I realize there is a range of acceptable criticism within a community, and Perl has a community that is probably more inclusive than most. However, "show me the patch" is a bit of a cop out. Don't get me wrong; it is a defensable position, but a willingness dismiss everyone without a fix makes it more likely they will go elsewhere. Look at (Common) Lisp.

                      P.S.
                      I love Perl and Lisp, but people tend to get defensive about sore spots. I sometimes think that it would have been easier on everyone to introduce P
                    • by chromatic (9471)

                      I don't mean to say that the only acceptable form of contribution is a patch. A bug report, a test, a question for the FAQ, a helpful answer on a mailing list or forum, a piece of documentation, an article, a tutorial, a book, or anything else constructive is absolutely fine.

                      Complaining in a completely unrelated forum without any apparent understanding of the issues or willingness to be a part of the community (by contributing anything) is completely useless. I don't see why the people who do contribute

          • by oliderid (710055)
            Me too, :-)

            I use Perl 5 mainly for quick and dirty scripts. Most of the time I find a good CPAN module to begin with. I won't use it for large scale projects. I find rather difficult for Object oriented programming. I tried it on a middle-size project. the Bless thing is difficult to understand. The syntax is too weird for me. This part of perl5 looks more like hack than an useful and an efficient tool. I find it extremely difficult to track bugs during the development process for example.

            I know Larry wall
      • by Evangelion (2145)

        There are some [perl.com] good explanations around about why they're rewriting perl.

        FWIW, this is set of features that are being implemented in Perl 6 that Perl 5 lacks:

        explicit strong typing
        proper parameter lists
        active metadata on values, variables, subroutines, and types
        declarative classes with strong encapsulation
        full OO exception handling
        support for the concurrent use of multiple versions of a module
        extensive introspection facilities (including of POD)
        LL and LR grammars (including a built-in grammar for Perl 6 its
      • by Jerf (17166)
        Context: I've been professionally programming Perl for years now. I prefer Python.

        If you try Python again, and try to find ways of using the extra features it has that Perl either doesn't have, or are borderline impossible to effectively use, you'll actually get a better understanding of some of the value of Perl 6. Perl 6, at least on the feature checklist, will blow past Python if it manages to come out reasonably soon. (Whether or not it will be more useful remains to be seen, but I'm comfortably open-mi
        • by cerelib (903469)
          I like the idea of implementing iterators in Perl, but you may be short-changing their usefulness. Look at the following script:

          open FILE, ";

          When an iterator(filehandle in this case) is evaluated in list context, in this case the context is "print LIST", it will iterate until exhausted and return a list. So this should print out the entire file whose name is passed in as the first argument. So, as you can see, an iterable object can be passed easily as a list. I hope that points you in the right direction
          • Okay, it looks like /. strips stuff out of plain old text. Let's try this again using (LT) and (GT) instead of the less than and greater than markups:

            open FILE, "(LT)$ARGV[0]";
            print (LT)FILE(GT);
          • by Jerf (17166)
            In other words, you can't pass that iterator around. Instead, Perl expands it fully into a list, and passes the list around.

            That's not passing an iterator, that's passing a list. Perl turns it into a list at the earliest available opportunity because nothing can handle getting an iterator. One of the key characteristics of an iterator is that it doesn't suck the entire file into memory all at once, even if you pass it into something else.

            To the best of my knowledge, you just can't quite get to Python cleanl
            • by chromatic (9471)
              In other words, you can't pass that iterator around.

              Indeed you can. You don't get the iterator as the return value from a read operation on the iterator, but who would expect that you do?

              See the book Higher Order Perl for far more examples.

              • by Jerf (17166)
                OK, that's what I get for taking people's examples at face value and not checking them.

                I've played around a bit more and found that while (my $val = <@something>) mostly does what I'm looking for, but I'm still not seeing an obvious way to take <@something> and get a reference to that iterator that I can pass somewhere else through syntax, rather than wrapping it in my ArrayIterator blessed-scalar class. Which means I still can't see a clean way to write a function to take an array or an iterato
                • by chromatic (9471)
                  ... there's a fundamental disconnect between "arrays" and "iterators" that is just barely enough to keep you from using one as the other routinely, which is what you need for extensive library support.

                  You're right about that. It's probably too late to fix that in Perl 5, though that does give me an idea.

                  • by Jerf (17166)
                    I'd sing your praises and be happy to be wrong.

                    I'll freely admit that I haven't thought the whole thing through and I'm not a language designer, but I'd submit having <> working on references to arrays the same way that it does on normal arrays would get me at least most of the way there, allowing me to pass a scalar that provides an overloaded <> or a ref to an array and have the behavior flattened. Currently, that's a "Not a GLOB reference" error.

                    Enough that I'd wipe off the language support p
    • by arodland (127775)
      Well... there's the lazy evaluation and autolambda stuff that lets us steal some more of the best tricks from the functional programmers. There's the junctioning and type inferencing stuff that opens up something vaguely like logic programming. There's the OO and metaclass stuff that gives you a consistent object model, roles, multimethods, contract programming... the ability to have stricture like the Java folks do (Perl 5 offers a good number of opportunities to impose stricture, but when it comes to OO,
    • Parrot will be much faster than Perl5 is now, and you will be able to run all your old Perl5 code with Ponie.

      Parrot may also become the standard VM for "dynamic" languages, like Python and Ruby, and there are already many implementations of many languages running on Parrot.

      This means that you can learn Perl6 slowly, and only use it for new code, and delay rewriting your old code for as long as possible. But there are many other reasons Perl6 will be not just good, but amazing, if I'm to believe what arodla
  • And here is the draft cover of the Perl 6 book [alma.ch]
  • good summary (Score:3, Insightful)

    by oohshiny (998054) on Friday September 29, 2006 @10:47AM (#16246147)
    Sadly, I think that photo essay just about sums up the state of Perl these days.

    Hint: pictures of the grandkids is not what people with deliverables and deadlines want to see.

    (I probably started using Perl more than 15 years ago. Perl was the best thing since sliced bread then, because it provided a cleaner and easier to use alternative to writing scripts in combinations of shell, awk, sed, tr, and a few other command line tools.)
    • by mrsbrisby (60242)
      I probably started using Perl more than 15 years ago. Perl was the best thing since sliced bread then, because it provided a cleaner and easier to use alternative to writing scripts in combinations of shell, awk, sed, tr, and a few other command line tools.
      And so what exactly became a cleaner and easier to use alternative to writing scripts in combinations of shell, awk, sed, tr, and a few other commandline tools?
      • by oohshiny (998054)
        There half a dozen mature, widely used post-Perl scripting languages; take your pick.
        • by mrsbrisby (60242)

          There half a dozen mature, widely used post-Perl scripting languages; take your pick.

          No, I wanted to take _your_ pick, smartass. I'm not even aware that there is another language with a find . -name ... -type f -print0 | xargs -0 perl -p -i -e 's/"$//' analog. And a perl -n -e 'BEGIN {srand} rand($.) < 1 && ($line = $_); END { print $line; }'. And let's not forget ... | perl -n -e '$total = $total + $_; END { $total =~ s/(^[-+]?\d+?(?=(?>(?:\d{3})+)(?!\d))|\G\d{3}(?=\d ))/$1,/g; print "$total\

  • by Animats (122034) on Friday September 29, 2006 @12:17PM (#16247813) Homepage

    Perl 6 is a step forward from a language design perspective. A big step forward. Such a big step that, if you're going to change, you may as well go to Python and dump the Perl uglyness.

    The real problem with Perl is that it's a good language for small programs, but 10,000 lines of Perl is a mess unless you're a very disciplined programmer. The "there's more than one way to do it" is hell on maintenance programmers, because they have to know everything in the language to read code. Nor is reading Perl easy. I used to need three different Perl books when doing maintenance programming, because no one book, including Larry Wall's, covered everything in the language.

    Perl made the Web happen in the same way that Basic made the PC happen. We're grateful to Larry for giving us this tool. Now it's time to retire it and look at the pictures of the grandkids. Thanks.

    • Re: (Score:2, Interesting)

      by chromatic (9471)

      I think you have a typo. Let me fix it for you:

      ... but [the equivalent in any language of] 10,000 lines of Perl is a mess unless you're a very disciplined programmer.

      Assuming, as a rule of thumb, that a line of Perl is equivalent to ten lines of C, would you expect an undisciplined programmer to maintain 100,000 lines of C code with ease? Me neither.

      The "there's more than one way to do it" is hell on maintenance programmers, because they have to know everything in the language to read code.

      No, t

      • Programming is different. Your example of needing to know local and dialectical idioms is misleading, because programming language idioms are more abstract and harder to learn than natural language idioms. (I assume you didn't intend the more general use of the word "idiom.")

        A natural language idiom is essentially an item of vocabulary. "Flying off the handle" is a natural language idiom idiom; it is complete and includes no new systematic way to vary its meaning. A programming language idiom has any

        • "Flying off the handle" is a natural language idiom idiom

          Oops. I meant nothing special by "idiom idiom;" it's just a typo that slipped through.

        • by chromatic (9471)

          Your example of needing to know local and dialectical idioms is misleading...

          Perhaps I was a bit unclear. I didn't mean only the idioms of the language, but also the idioms of the problem domain. I'd make a terrible programmer for insurance or payroll software because I've never worked in either industry.

          That's something no language can completely solve, and yet another thing that depends on the discipline and standards of the entire team who created and maintains the software.

    • by melonman (608440)

      I know a lot more about perl and about python, but I've just spent half an hour looking around, and I can't find anything remotely resembling CPAN, which seems like one extremely good reason to stick with Perl. The nearest I can find is a static list of modules on the python.org site that, in total, is about a tenth the length of the CPAN list of XML-related modules alone.

      CPAN is another reason why your "10,000 lines of code" thing doesn't work. Larry Wall's "laziness" principle says that you use other peo

    • 10,000 lines of Perl is a mess unless you're a very disciplined programmer
      you say that like 10K of undisciplines anything isn't, I know people who can turn 1,000 lines of COBOL into a mess. Programmer discipline isn't a function of the language used.
      • That sounds reasonable, however because perl is so flexible the intent of a programmer
        is much more difficult to decipher because there are so many ways of accomplishing the same thing. It truly lends itself to spagghetti code in a way other languages don't.

        I wish that weren't the case. It's definitely possible to write good, maintainable perl. But it's the exception, not the rule. 10000 lines of the average perl program are much harder to read than the equivalent in e.g. python.

        Just my experience.
    • Dream on (Score:4, Insightful)

      by joe_n_bloe (244407) on Sunday October 01, 2006 @06:48AM (#16264651) Homepage
      The real problem with Perl is that it's a good language for small programs, but 10,000 lines of Perl is a mess unless you're a very disciplined programmer. The "there's more than one way to do it" is hell on maintenance programmers, because they have to know everything in the language to read code. Nor is reading Perl easy. I used to need three different Perl books when doing maintenance programming, because no one book, including Larry Wall's, covered everything in the language.

      Having worked in a production environment where hundreds of thousands of lines of Perl written by fewer than 50 developers have run with extreme reliability 24x7 for years, supporting a company of tens of thousands of employees worldwide, I feel confident in saying "you have no idea what you're talking about."

Only through hard work and perseverance can one truly suffer.

Working...