Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×
Perl Programming

Perl's Extreme Makeover 408

PurdueGraphicsMan writes "There's an article over at Yahoo! about the upcoming version of Perl (version 6) and some of the new features (RFC list). From the article: "Although Perl 5's expressions are the most sophisticated available and aspired to by other programming languages, "no one pretends for a moment that they're anything but hideously ugly," said Damian Conway, a core Perl developer and associate professor at Monash University in Australia.""
This discussion has been archived. No new comments can be posted.

Perl's Extreme Makeover

Comments Filter:
  • by microbob ( 29155 ) on Thursday February 19, 2004 @05:41PM (#8333087)
    Good! Looks like they kept Perl5 in mind and it will flip into a special mode to execute older Perl5 code.

    Nice!

    -mb
    • by ikewillis ( 586793 ) on Thursday February 19, 2004 @07:04PM (#8334082) Homepage
      Not only is it backwards compatible, but thanks to Perl 6's new modular architecture, Perl 5 code will simply include a separate parser/compiler which will generate code which will execute through the Parrot [parrotcode.org] runtime, which adds a number of optimization benefits (at runtime, even) not currently possible through the current Perl 5 compiler/parser/runtime mush.

      Consequently, Perl 5 code should run faster under Perl 6.

  • by Anonymous Coward on Thursday February 19, 2004 @05:43PM (#8333106)
    a ,There's been
    a 0 an explosion
    a /|\ at the ASCII
    a | factory!!!!
    a /|
  • Perl Haikus (Score:5, Funny)

    by Anonymous Coward on Thursday February 19, 2004 @05:43PM (#8333114)
    Okay, about 99% of the Perl Haikus will not apply anymore.
  • by StuWho ( 748218 ) on Thursday February 19, 2004 @05:44PM (#8333120) Journal
    "But Perl also will remain a language with the diehard developer fans who are the impetus behind its popularity. "Personally, I'm hoping to get Parrot embedded into games and office suites," Sugalski said. "I for one would love to write my word processing macros and game scripts in Perl or Forth rather than in whatever hand-rolled language someone's come up with."

    Back to Pac Man and Vi then...

  • by thepyre ( 697537 ) on Thursday February 19, 2004 @05:46PM (#8333140)
    "no one pretends for a moment that they're anything but hideously ugly," Does he mean the lines of code or the programmers themselves?
    • by gUmbi ( 95629 ) on Thursday February 19, 2004 @05:56PM (#8333263)
      Yes.
    • by imipak ( 254310 )
      I must be sick in the head or something, but I fell in love with Perl reading the 'Learning Perl v4' llama on the tube in 96 - to me the elegance simplicity and yes beauty of the code really took my breath away. Good Perl code is one of the few things that aren't music that genuinely move me, tickle my aesthetic dangleberries as it were.... I mean... while (){ print; }... *sigh* no really. I'm serious. Granted I was programming in Visual Basic when I fell for Perl - frmo the ridiculous to the sublime re
  • Expressions .. (Score:4, Insightful)

    by Billly Gates ( 198444 ) on Thursday February 19, 2004 @05:47PM (#8333148) Journal
    .. is why I prefer python over perl. The resulting code is soo much cleaner.

    I suppose it has to do with the old debate of losely or strict typed langauges. Perl is highly modular but I would hate to work in a team of 10 or more perl developers all writing in their own styles and methods. Shudder.

    Yahoo decided to support php rather then perl in their next generation yahoo services specificially because of "There is more then one way to do it".

    Of course its all being outsourced to India now where they can just hire more developers if complex problems arrise
    • Re:Expressions .. (Score:5, Insightful)

      by Xzzy ( 111297 ) <`gro.h7urt' `ta' `rehtes'> on Thursday February 19, 2004 @05:55PM (#8333257) Homepage
      > .. is why I prefer python over perl. The resulting code is soo much cleaner.

      Yes but you have to admit that perl has a certain charm about it.

      Haven't you ever sat there staring at a subroutine, thinking to yourself "man I sure wish I could just hold shift and slide my finger over the number row to get this done"? Then gone on and painstakingly crafted what you wanted to do in whatever strict language you were actually working in? ;)

      Maybe it's just me. But every time I sit down and promise myself to write a new script all tidy and clean in python, about five minutes into it I'm muttering "if this were perl I coulda been DONE by now" and quickly revert back to old faithful.
      • Re:Expressions .. (Score:4, Insightful)

        by kfg ( 145172 ) on Thursday February 19, 2004 @06:06PM (#8333398)
        Yes, but the flip side comes only a day later, when I sit down at my Python code and immediately start editing.

        Whereas I look at my Perl code for about an hour and a half thinking, "Ummmmmmm, what the fuck is this supposed to mean?

        Not that either of them have a patch on APL, mind you. APL Roolz.

        KFG
        • by cliveholloway ( 132299 ) on Thursday February 19, 2004 @06:45PM (#8333882) Homepage Journal
          They're great. They help you to remember and comprehend code you wrote a while back. If you start a line with a "#" you can follow it with a comment.

          If you're looking at code *you wrote* for over an hour without understanding it, you only have yourself to blame. Unless you're coding in brainfuck [catseye.mb.ca], I suppose.

          tch

          cLive ;-)

        • Whereas I look at my Perl code for about an hour and a half thinking, "Ummmmmmm, what the fuck is this supposed to mean?

          Which is why you use comments like this:

          s/(.*?\s+)\(.*?\)/$1/g # PC LOAD LETTER
      • Re:Expressions .. (Score:3, Interesting)

        by mcrbids ( 148650 )
        Maybe it's just me. But every time I sit down and promise myself to write a new script all tidy and clean in python, about five minutes into it I'm muttering "if this were perl I coulda been DONE by now" and quickly revert back to old faithful.

        Funny. I feel the same way about PHP. It's routine for me to take some broken, busted stuff written in Perl or c or whatever, and redo it in PHP in 1/4 the lines.

        As Jethro Tull once said:

        "You know what you like, and you like what you know".

        I can "do" Perl, but it
    • Re:Expressions .. (Score:5, Insightful)

      by consumer ( 9588 ) on Thursday February 19, 2004 @07:09PM (#8334134)
      Yahoo decided to support php rather then perl in their next generation yahoo services specificially because of "There is more then one way to do it".

      Pretty ironic when you consider that PHP has exactly the same issue, along with some other issues Perl does not have (lack of namespaces, inadequate comparison operators, etc.).

    • Perl is highly modular but I would hate to work in a team of 10 or more perl developers all writing in their own styles and methods. Shudder.

      Its called DISCIPLINE and its not that hard. Someone makes rules for the dev team and then they are followed and then your code is clean and readable. Why should the language force you to be disciplined? Good programmers know to program following some kind of standard.

      And why does everyone bring up PHP? PHP is nothing but Perl with all the best parts taken out and e
  • by HappyCitizen ( 742844 ) on Thursday February 19, 2004 @05:47PM (#8333158) Homepage Journal


    Unreadable code,
    Why would anyone use it?
    Learn a better way.

    ugliness that grows
    into beauty inside of
    your favorite shell

    Arbitrarily
    Nested structures for data;
    Joy of birds in flight.

    As with the spring rain
    Perl is indispensable
    Unquestionable

    http://aspn.activestate.com/ASPN/Perl/Haiku/Abou tP erl
  • by devphaeton ( 695736 ) on Thursday February 19, 2004 @05:49PM (#8333181)
    ...would be able to tell me if i should

    a) start learning 5 anyways

    or

    b) wait till 6 is released, because going from barely having a grasp on 5 and then trying to learn 6 would just confuse myself?

    i realise that all the perl5 code in the world won't suddenly cease function the minute perl6 is released, but still..

    I can see the value in perl, and what a great tool it is, but for some reason i have a hard time wrapping my lil brain around it. It's a bit less "structured" or "consistent" than say C is. I suppose it has to be that way in order to do what it does, though.
    • by smack_attack ( 171144 ) on Thursday February 19, 2004 @05:53PM (#8333236) Homepage
      Learn 5, because it will probably take a few months until 6 is standard. Either way, in a few years you will look back on whatever you coded today and shake your head in shame. /used to printf() every line when he learned PHP
    • As a Perl 5 programmer, I don't think Perl 6 will be all that good.

      Not everyone will switch immediately, and not everyone will need/want to switch anyway.

      I say go on and learn Perl 5, you won't regret it...
    • by psycho_tinman ( 313601 ) on Thursday February 19, 2004 @05:59PM (#8333325) Journal

      I cannot claim to intimately know Perl 5, but I started learning it a few years back. I belong to the camp of Perl programmers (and I know there are a few of these) who are adopting a "wait and see" attitude to Perl 6.

      If you're interested in learning Perl now, you should probably go for the cookbook approach, ie: get a copy of OReilly's Perl cookbook and just try applying the solution to your problem. Then, trying tweaking and figuring out how it works.

      As for learning Perl 5, I'd probably point out that there are still some places that run 5.005_03 (certainly Solaris used to ship with that version by default), and that version is at LEAST 5-6 years old :) There are even some places I've heard of that run Perl 4 :) So, I think there is plenty of time to have your investment in learning Perl pay off before people start switching to Perl 6 en masse.

    • by Telastyn ( 206146 ) on Thursday February 19, 2004 @06:03PM (#8333359)
      Personally, I found that perl was kind of odd and not fantastic until I learned perl with regexes [via O'Reilly's Mastering Regular Expressions, highly recommended]. Then alot of the little nuances made alot more sense. Alot of the examples in that book were things perl does easily in a few lines, but would cause most programmers to gouge their eyes out if they needed to do it in C.

    • It's all going to depend on how much they change the syntax, which Yahoo!!!!!111! doesn't seem to be providing us with right now. (I'm sure if I were on a perl list I'd hear more about it.)

      Personally what I'd recommend (as a full-time perl programmer) is to learn 5 anyway. It'll take two or three years before the next edition of the Llama (O'Reilly, _Learning_Perl_, look it up your own darn self on Amazon if you must) is out, and in the meantime you can get out of the baby-talk phase this way. Learn reg
    • by ChaosDiscord ( 4913 ) on Thursday February 19, 2004 @06:05PM (#8333387) Homepage Journal
      start learning 5 anyways or ... wait till 6 is released

      Learn Perl right now because it will make your life better (assuming your life can be made better by a powerful scripting language/glue-layer from heck). Perl 6 is still far off on the horizon and Perl 5 knowledge will largely transfer to Perl 6.

      I can see the value in perl, and what a great tool it is, but for some reason i have a hard time wrapping my lil brain around it. It's a bit less "structured" or "consistent" than say C is.

      I think that setting out to learn Perl for its own sake will generally not work. One of Perl's strengths is that it grows with you and your needs. Learn a little bit of Perl and you still solve some very useful problems. For example, many people first learned Perl to do some quick-and-dirty projects like one-off data file reformatting, internal report generation, or simple CGI scripting. Learn more as you need it. It's taken me years to get to the point where I might call myself a skilled Perl hacker. But every step along the way was pleasant. I never felt I was learning stuff for the sake of learning stuff; I was always learning something that made my goals right now easier to achieve.

      Perl is about serving you, not you serving it.

    • by cliveholloway ( 132299 ) on Thursday February 19, 2004 @06:10PM (#8333449) Homepage Journal

      Start now. It's gonna be a while before six is out - and even longer before companies will trust it in production environments.

      And come over to The Monastery to get help when needed. A great resource for new (and experienced!) Perl hackers. [perlmonks.org]

      .02

      cLive ;-)

    • by Phillup ( 317168 ) on Thursday February 19, 2004 @06:54PM (#8333966)
      Over twenty years I've programmed with at least as many languages.

      So, I won't claim to know any language intimately.

      But... I have programed in Perl for the last five years. Why is simple.

      Because Perl let's me leverage the last 20 years of programming. If they see a good idea in another language... they put it in Perl.

      You will see a lot of people complain because of how Perl code looks. The simple fact is that you can write clean looking code... or ugly code. Perl doesn't care. It is your code... do it the way you want.

      Perl's strength is that it let's a programmer program the way they want to. That is also it's weakness.

      My advice would be to spend a few more years with a few other languages. You won't appreciate Perl until you know how elegantly it lets you solve some problems that you have used other tools for.

      If you are looking for "structure" and don't have the discipline to enforce it yourself... then stay away from Perl.
    • by thogard ( 43403 ) on Thursday February 19, 2004 @07:10PM (#8334141) Homepage
      The procedural stuff will remain the same. The OOD is getting a decent syntax and will no longer be a bolted on hack.

      Perl started life as shell script with a built in sed and awk. It has since grown.

      The regex stuff in perl 5 is just like sed and grep as far as new user is concerned. The simple regex stuff won't change with perl 6 and the concepts are the same. Perl 6 is going to change the shortcut symbols for the regex expressions.

      Perl5 have has a =~ operator that is going to get replaced with a ~~ operator. The ~~ will work in many places where the perl5 =~ won't work. This is part of the push to make perl more orthogonal.

      Perl6 will also deal with unicode out of the box with no real issues. Perl5's unicode was a bit of a hackjob as the coders learned along the way. Not that unicode is understood, it will be done right. Some of perl6 seems to be intended to get rid of bad practices based on the concept that "all the world is ascii". For example in Perl upto 6 you can say [a-zA-Z] to mean letters but that won't pickup up the latin-8 char set. Perl6is going to make it harder to say that and easy to say "Letters in the current language".

      The list processing may get to the point that it is on the same level as lisp.

      Perl6 appears to about about 18 months away so if your going to wait, its a long wait.

      Damian Conway gave a great talk on this just a few days ago. If you get a chance to hear him talk, take it.
  • by Saeed al-Sahaf ( 665390 ) on Thursday February 19, 2004 @05:49PM (#8333184) Homepage
    "hideously ugly" and "Perl" in the same paragraph? Who would have thought!
    • by Naikrovek ( 667 ) <jjohnson&psg,com> on Thursday February 19, 2004 @06:39PM (#8333808)
      You guys...

      Perl, if written right, can be a VERY good looking, and VERY easy to understand. All of you that say that it is hard to read are:

      a) reading code that wasn't meant to be cute, but was meant to work where nothing else was as practical,
      b) reading code that was written by someone that didn't know perl, or are
      c) reading code written by someone that knows perl a LOT better than you.

      In my personal experience, people that gripe about Perl are the ones that use it least. The people I know that use Perl quickly learned to love it.
  • by Bingo Foo ( 179380 ) on Thursday February 19, 2004 @05:49PM (#8333188)
    Since the article is slashdotted, I have reprinted the text below:

    $_

  • by use_compress ( 627082 ) on Thursday February 19, 2004 @05:50PM (#8333194) Journal
    With such bloated and obscure syntax in both the language and regular expressions, why do you think Perl 5 has become so popular? Once you've written a few programs in it, it is ULTRA EASY, ULTRA FAST and not hard to remember. An experienced Perl programmer could probablyl do almost any text processing task in a third of what it would take an expert C++ programmer to do. All of the bloat and lack of orthogonality and "bad design" paradoxically makes Perl 5 a fantastic language to program. I hope Wall doesn't mess this up...
    • by Garin ( 26873 ) on Thursday February 19, 2004 @06:30PM (#8333694)
      Definitely true. There is only one reason why Perl code is so frequently ugly:

      Perl exposes the mind of the programmer more directly than any other programming language.

      If you are more interested in quick hacks and dirty tricks than writing clean and manageable code, your perl will reflect that. If you are interested in impressing people by compressing seventeen operations into a single line of code, your perl will be an ugly, ugly thing.

      However, if your intention is to write clear, maintainable, understandable code, then this is what you will write. It isn't hard -- in fact I believe that Perl's flexibility makes this a much easier task than just about any other language. Here are a few of my favourite rules for Perl programmers:

      1) Just because you can, doesn't mean you should.

      2) One line of code means one operation or idea. MAAAAYBE 2. See point #1.

      3) If there is a cute, short, hackerish way to do something, and a longer, more boring, more explicit way to do the same thing, ALWAYS pick the boring way. Anyone who looks at your code in six months will be very pleased (instead of ready to kill you). Since Perl is so flexible, this is always possible. As for performance, well, in my experience the slick, hackerish ways of doing things often slow things down more than the explicit-using-more-lines way of doing things.
      • Performance (Score:3, Interesting)

        by sbszine ( 633428 )
        As for performance, well, in my experience the slick, hackerish ways of doing things often slow things down more than the explicit-using-more-lines way of doing things.

        Amen. I think this is because the interpreter / VM is usually optimised for the most obvious way of doing things. If you try and improve the performance of your code with tricks and shortcuts, you're basically trying to outsmart the Larry and the other internals hackers.
    • An experienced Perl programmer could probablyl do almost any text processing task in a third of what it would take an expert C++ programmer to do.

      No expert C++ programmer would do a text processing task in C++. Most experienced programmers would use the scripting language they know best. They might write or use a module written in a compiled language if the task is more complicated than simple text munging.

  • Too many cooks (Score:4, Interesting)

    by ObviousGuy ( 578567 ) <ObviousGuy@hotmail.com> on Thursday February 19, 2004 @05:51PM (#8333212) Homepage Journal
    While no one would ever accuse Perl of being single minded and focused, until Perl5 it was a fairly coherent language.

    I understand that Perl6 is supposedly an evolution of the language, but there are so many suggestions for so many features and changes that the language itself seems to suffer from the too many cooks problem. With everyone and their brother suggesting features, the language itself becomes a mish mash of these features without a central theme tying it all together. Even if you said that DWIM was the central theme, can you really justify that when WIM is not what the language does because the feature that I'm using was designed by someone who had a completely different idea of what he meant?

    In the past Perl has added functionality that was useful and you can see where the language has its partitions. Base Perl (datatypes, simple arithmetic, simple string manipulation), nested datastructures, regexes, OO, and so on. While admittedly a mess, each addition to the language brought more power and ease. Perl6, OTOH, seems to be adding feature after feature without regard to whether it makes the language easier to use, only more powerful.

    So you end up with a new interpreter that won't run your old scripts without modifying the scripts. At the very least it should automatically default to Perl5 syntax unless otherwise told to use Perl6 syntax. Unfortunately, in the push to evolve, Larry and Damian (and the rest of the lunatics) have foregone automatic backwards compatibility.

    I'll probably migrate, but not for a while.
    • Re:Too many cooks (Score:3, Informative)

      by kinsoa ( 550794 )
      there *is* a full backward compatibility : Parrot will run your Perl5 code. And if you don't want to run old perl5 code, there will be a script to convert your code.

      and you don't have to care about migration for now - not until the next two years. Perl6 is not ready.

      the "lunatics", as you said, seem to be very serious and competant...

  • by ChaosDiscord ( 4913 ) on Thursday February 19, 2004 @05:53PM (#8333235) Homepage Journal

    If you want the real scoop on the on-going planning of Perl 6, you might want to check out Larry Wall's Apocalypse articles: 1 [perl.com], 2 [perl.com], 3 [perl.com], 4 [perl.com], 5 [perl.com], 6 [perl.com]. On the down side, they are dense. Very dense. For that reason, I actually recommend Daimon Conway's Exegesis articles: 2 [perl.com], 3 [perl.com], 4 [perl.com], 5 [perl.com], 6 [perl.com]. They provide alot more context on what the changes actually mean to you and why they're good.

  • by Nugget ( 7382 ) * on Thursday February 19, 2004 @05:56PM (#8333274) Homepage
    This pic says it all [bewilders.us]
    • by ChaosDiscord ( 4913 ) on Thursday February 19, 2004 @06:10PM (#8333448) Homepage Journal
      Heh. Still, it's worth noting that this isn't new to Perl 6. Perl's always been a Chimera. Quoth the Perl man page (as it has as long as I can remember), "Perl combines (in the author's opinion, anyway) some of the best features of C, sed, awk, and sh, so people famil- iar with those languages should have little difficulty with it. (Language historians will also note some ves- tiges of csh, Pascal, and even BASIC-PLUS.)" As for why being a freakish blend and a giant mess is actually a feature, I suggest checking out Larry Wall's Second State of the Onion [perl.com]. (It's a long page, but the stuff on the advantages of complexity is all near the top.)
  • by Chuck Bucket ( 142633 ) on Thursday February 19, 2004 @05:57PM (#8333296) Homepage Journal
    Why do we use Perl every day? Because Perl scales to solve both small and large problems. Unlike languages like C, C++, and Java, Perl allows us to write small, trivial programs quickly and easily, without sacrificing the ability to build large applications and systems. The skills and tools we use on large projects are also available when we write small programs.

    I'm not a Perl hacker by any means, but after the possibilities are endless, and I don't think Perl will ever die.

    CB

    • by mortenmo ( 95589 ) on Thursday February 19, 2004 @06:07PM (#8333410) Homepage
      But why would you want a language that can solve both small and large problems? Why not use a good language to solve "small problems" for "small problems", and a good language to solve "large problems" for "large problems"?

      Of course, I would probably argue that Perl cannot solve "large problems" after creating 100k+ line Perl applications. The problem lies that the reason languages like Perl is good for quick and dirty hacks is just the reason they are not that good for large systems that needs to be maintained over longer periods of time with many developers involved.
  • Ugly code (Score:5, Funny)

    by mr100percent ( 57156 ) * on Thursday February 19, 2004 @06:00PM (#8333335) Homepage Journal
    Neo: Do you always look at it heavily encrypted?
    Cypher: Oh that's not encryption... It's a new Perl script I'm working on...

    The Matrix Bastardization [detonate.net].

  • by FatRatBastard ( 7583 ) on Thursday February 19, 2004 @06:02PM (#8333352) Homepage
    user...

    Is Parrot something akin to the JVM / .NET runtime engine? If so is the plan for it to be as robust as the JVM / .NET runtime: i.e. could the same type of applications that people are building for Java / .NET be just as easily built with Parrot?

    If I'm reading all of this right Parrot may well become everything Sun wants Java to become / MS wants .NET to become without the "what are those bastards going to do to the platform" stench.

    Of course, if I have the wrong end of the stick here I apologise. Perl isn't my strong suit.
    • by J-Worthington ( 745904 ) on Thursday February 19, 2004 @06:28PM (#8333675) Homepage
      Parrot will be a virtual machine like the JVM and .NET runtime, yes. This means you can call functions and use objects from code written in the various different languages that target Parrot, compile stuff to bytecode that will run wherever Parrot will compile and more. Like .NET and JVM it uses JIT techniques to provide fast code execution.

      The main difference between Parrot and .NET/JVM is that they are more targetted towards statically typed languages. Languages like Perl, Python, etc that are likely to target Parrot are dynamic languages. This isn't just related to dynamic typing, but also to dynamic languages needing their parsers to be available at runtime. You can also do more stuff at runtime that non-dynamic languages would prefer you didn't. Parrot is designed with this in mind, which means it can offer these sorts of languages better performance.

      I have heard things along the lines of JVM and .NET bytecode to Parrot bytecode convertors, but I'm not sure how much speculation that is. I'm not really certain how easy it'd be, though my initial guess is "not very".

      Hope this answers some of your questions.
  • by mkaltner ( 555433 ) on Thursday February 19, 2004 @06:04PM (#8333373)
    Why does everyone say perl syntax is so damned ugly? Appearantly, they haven't seen C code written by someone with a "I'm a C God - Complex". I agree with some of the other posts here, it's only ugly if you have never used the language before. Write yourself a script or two and you quickly catch on.

    In fact, it's just like ANY other language (programming or spoken at that), it looks foriegn (go figure) until you put a little effort into it and figure it out.

    JM2C

    - Mike
  • by Repton ( 60818 ) on Thursday February 19, 2004 @06:07PM (#8333413) Homepage
    Perl, a high-level programming language that was critical in the initial construction of the Internet, ...

    Perl was first released in 1987 [perl.org]. Y'know, I could've sworn the internet already existed back then...

    (especially since Perl was released in a post to alt.sources)

  • by Ars-Fartsica ( 166957 ) on Thursday February 19, 2004 @06:12PM (#8333483)
    The first Apocalypse was published in 2001. It is now 2004 and we are patient but perl 6 is starting to smell like vapor.

    Larry, you need to get an alpha out in 2004 (even if all of the Apocalypses have not been published) or I think you are going to see people lose interest in perl 6. In the time between Apocalypse 1 and today, the mono team have basically cranked out an entire development environment of excellent quality.

    Signed, an eight year perl programmer and major fan.

  • for the naysayers.. (Score:5, Informative)

    by psycho_tinman ( 313601 ) on Thursday February 19, 2004 @06:12PM (#8333486) Journal

    A few points to ponder ..

    You've all heard the "you can write unreadable code in any programming language" argument, so I'll spare you the repetition.. (No, wait.. I didn't, did I? ) *grin*

    But also bear in mind that Perl is the first language that I know of that used the foreach construct in the same form as the more sought after languages.. Java has iterators and enumerators, but they introduced a foreach because it is darn easy to understand.

    Perl innovated in regular expressions. Even Jeffery Friedl's Mastering Regex (sic) says that other languages aspire to be called "Perl 5 compatible" when they don't necessarily support all the features of Perl 5.6". Love it or hate it, regular expressions are like the microwave in your kitchen. Once you get used to it, it's darn hard to manage without :)

    I am not going to go into Perl 6 the moment it is released. But I guess that's ok, because I didn't adopt 5.8 the day it was released either. I just think that Larry Wall has made enough good calls in the language so far, to be worth trusting him for another version. Even one that promises to break some of the idioms that I am accustomed to in it's present incarnation. Hey, I didn't like Perl 5 when I first saw it either, but I notice the difference in my productivity when I got the hang of things.

  • Say what? (Score:3, Insightful)

    by rewt66 ( 738525 ) on Thursday February 19, 2004 @06:19PM (#8333554)
    "Although Perl 5's expressions are the most sophisticated available and aspired to by other programming languages..."

    I can't believe that nobody's challenged this statement yet. Somehow I don't think that Lisp or Prolog aspire to Perl 5's expressions...

  • by Artifakt ( 700173 ) on Thursday February 19, 2004 @06:19PM (#8333563)
    If Perl user's hadn't created the annual Obfuscated Perl contests, people wouldn't say such mean things about how the code looks ... Uh, no wait, isn't there one of those for C too? Well, if Perl had come along after the flaws in C++ were arround long enough to become really apparent, like Python ... Whaddya mean, it did? Uh, If Perl was distinguishable from line noise, people wouldn't say ugly, so there!
  • Release date: 2020 (Score:5, Insightful)

    by thelenm ( 213782 ) <(mthelen) (at) (gmail.com)> on Thursday February 19, 2004 @06:23PM (#8333611) Homepage Journal
    I was very excited about Perl 6 when Larry started releasing apocalypses. I really hate to say it, because I'm as big a fan of Perl as anyone... but at the current rate, we're not going to see a full specification (much less implementation) of Perl 6 anytime in the next 15 years. There have been 6 apocalypses in the past 3 years, and there are supposed to be about 30 in all.

    Perl has a long history of being practical and useful rather than theoretically perfect, and it makes me sad to see the trend reversing with Perl 6. It seems like Larry is trying to make Perl 6 everything to everyone. That's one sure way to fail (although TMTOWTDI, of course :-) It's just not useful to anyone if it doesn't exist.
  • Perl.... (Score:4, Funny)

    by silverhalide ( 584408 ) on Thursday February 19, 2004 @06:25PM (#8333631)
    ...is the duct tape of the internet.
  • Parrot (Score:5, Informative)

    by steveha ( 103154 ) on Thursday February 19, 2004 @06:27PM (#8333659) Homepage
    I was intrigued by the news of Parrot, the interpreter core. It's a virtual machine, register-based rather than primarily stack-based as some other virtual machine cores have been. This is to take advantage of compiler technology.

    Long-term, Parrot hopes to be at the core of not just Perl 6, but also Python, FORTH, and what-have-you. Then applications could support Parrot, and users could script the applications in their favorite language. Python users could call into Perl CPAN code. That sort of fun thing.

    Parrot's home page is: http://www.parrotcode.org/ [parrotcode.org]

    The Parrot FAQ [parrotcode.org] is worth reading. There are some really entertaining sections. One of my favorites:
    Why should I program in Parrot Assembly language?
    [...]
    You get all the pleasure of programming in assembly language without any of the requisite system crashes.


    Another:
    What language is Parrot written in?

    C.

    For the love of God, man, why?!?!?!?

    Because it's the best we've got.

    That's sad.

    So true. Regardless, C's available pretty much everywhere.


    So, my next question was: if they want to become the core of languages like Python, what does Guido van Rossum (the architect of Python) have to say about that? A few google searches later, and I found an interview at linuxfr.org [linuxfr.org], which contained this:
    DLFP: What do you think of the Parrot project (http://www.parrotcode.org/), which aim is to develop a common virtual machine for interpreted languages, such as Perl 6, Python, Ruby and Tcl ? [Jean-michel Fayard]

    Guido: I wish them well, but I don't think they will succeed. They are vastly underestimating the effort that goes into a virtual machine for any specific programming language. Even languages as similar as Ruby and Python have fundamentally different runtime abstractions, and the difference between Python and Perl is much greater still. (For example, the concepts of strings and numbers are entirely different in these two languages: in Python, numbers and strings are different immutable types, while in Perl they are the same type and are mutable.) I expect Parrot will do a great job of running Perl 6, but a relatively poor job of running other languages. Of course, I'd be happy if I were wrong (except for the brief moment of receiving a pie in the face at OSCON 2004), but I don't expect that to happen.

    steveha
  • SNOBOL (Score:3, Interesting)

    by Stephen Samuel ( 106962 ) <samuel AT bcgreen DOT com> on Thursday February 19, 2004 @06:27PM (#8333660) Homepage Journal
    I haven't seen much of the new perl expressions lately, but they're gonna have to be pretty hot to beat what SNOBOL (spitbol) used to do, [google.ca]
    Spitbol could do things like:
    • stringtomatch "this is some text" skipto("(") $ pre_paren ( funcof(pre_paren)$parenmatch = replacement(parenpatch) )
    In this case, the $ is an immediate assignment of the match from skipto("(") (roughly equivalent to /([^(]*)/ . )
    funcof is then called with the newly assigned variable (pre_paren), and it's result is inserted as an expression to complete the match.
    then whatever matched funcof(pre_paren) is replaced by the results of replacement(parenmatch)

    skipto is a builtin, but funcof and replacement would have to be user-defined (and they can be defined on the fly).

    Perl6 appears to have similar functionality, but (IMHO) I don't think it's going to be quite as nice as the SNOBOL syntax.

    Unfortunately, I'm not good enough at compiler design to write my own spitbol interpreter, or I would.

    The one problem with snobol is that it was created before the idea of structured programming came along, so it is goto-structured... (although somebody then came up with ratbol which was essentially a preprocessor to provide RATional structure to snoBOL)

    • Re:SNOBOL (Score:4, Interesting)

      by Stephen Samuel ( 106962 ) <samuel AT bcgreen DOT com> on Thursday February 19, 2004 @06:41PM (#8333834) Homepage Journal
      omigod... someone just (yesterday) released an up-to-date version of snobol [snobol4.org] I'm in patern-hacker's heaven.

      Oh, and just to keep on subject:
      SNOBOL is considered to be the parent of unix regexpressions and awk which led to Perl. Unfortunately, the children inherited a much castrated version of snobol's string manipulation capabilities which have only now been reasonably addressed in perl6.
      If nothing else, I suggest that people interested in the history of pattern matching take a good look at snobol.

  • by Tikiman ( 468059 ) on Thursday February 19, 2004 @06:31PM (#8333700)
    If the programmer is disciplined and well organized, the code will be disciplined and well organized. If the programmer doesn't value readability, then the code will not be readable. People like to take pot-shots at Perl, but they should really be aimed at Perl programmers.
  • by isomeme ( 177414 ) <cdberry@gmail.com> on Thursday February 19, 2004 @06:53PM (#8333960) Journal
    Larry Wall is a god, his core Perl dev team are demigods, and I'm very excited by all the goodies in Perl 6. But I have to wonder...if 6 is going to break so much existing code that it needs a hack to be backward compatible, why not just release a new language? What's the point of holding onto the name Perl but not the reality of running existing Perl code?
  • by xtronics ( 259660 ) on Thursday February 19, 2004 @06:54PM (#8333969) Homepage
    It is better to startover than to try and modify a perl script.
  • Python Resources. (Score:3, Informative)

    by Anonymous Coward on Thursday February 19, 2004 @06:55PM (#8333985)
    This is a list of what I consider to be the most useful Python packages. They give Python the ability to tackle almost any project.
    • Python [python.org] - Get the Python interpreter, base libraries from here. The default install includes the IDLE editor.
    • Win32All [python.net] - Windows extensions package that includes the excellent Pythonwin editor.
    • wxPython [wxpython.org] - Wrapper to the cross-platform wxWindows window manager library. It's a better windowing system than the TCL/TK library that is the default Python install.
    • Boa Constructor [sourceforge.net] - GUI builder that uses the wxWindows library.
    • Psyco [sourceforge.net] - x86 runtime compiler. Transparently improves the performance of most Python code - for performance-critical apps, it's often a much better solution than a C rewrite.
    • Py2Exe [python.net] - Builds Python scripts into Windows executables. Perfect for distributing programs to systems that do not have Python installed. Use with Psyco for the best effect.
    • PyOpenGL [sourceforge.net] - Use OpenGL from within Python
    • Python Image Library (PIL) [pythonware.com] - Package for easy image loading and manipulation
    • Plone [plone.org] - Web applications, built on top of the Zope [zope.org] framework.

    Abandon Perl! Python is the future!
  • Quote-mania (Score:3, Funny)

    by OblongPlatypus ( 233746 ) on Thursday February 19, 2004 @07:12PM (#8334166)
    CmdrTaco wrote: "PurdueGraphicsMan writes "There's an article over at Yahoo! about the upcoming version of Perl (version 6) and some of the new features (RFC list). From the article: "Although Perl 5's expressions are the most sophisticated available and aspired to by other programming languages, "no one pretends for a moment that they're anything but hideously ugly," said Damian Conway, a core Perl developer and associate professor at Monash University in Australia."""

    Four levels of quotes; fun...
  • by sir_cello ( 634395 ) on Thursday February 19, 2004 @07:28PM (#8334335)

    What more to say ? Any real engineer has a "toolkit" of languages they use to put things together: I find "shell" to be glue, and "perl" to be rapid production of do-anything using CPAN modules. That's perl's niche.
  • Debian (Score:5, Funny)

    by OverlordQ ( 264228 ) on Thursday February 19, 2004 @09:41PM (#8335615) Journal
    *whew* Since I'm running Debian Stable I wont have to worry about learning Perl 6, till Perl 7 is ready to hit the shelves.
  • Threads! (Score:3, Informative)

    by yem ( 170316 ) on Friday February 20, 2004 @01:23AM (#8337120) Homepage
    Thank god threading is at the top of the list [perl.org].

    I've been a perl programmer for six years - I still use it daily - but perl5's support for threading absolutely blows. There are plenty of modules for whipping together a multithreaded TCP server, but no reliable way to share a resource such as a database connection pool between those child threads. Have had to put at least one project on indefinite hold due to this failure.

    I assume its that oldskool anti-threading anti-OO attitude. Perl5 still isn't compiled with threading support by default and it breaks a tonne of modules and apps when it is.

    Perl6 can't get here soon enough.

  • by winkydink ( 650484 ) * <sv.dude@gmail.com> on Friday February 20, 2004 @02:56AM (#8337516) Homepage Journal
    If it gets the job done efficiently, I couldn't care less how "ugly" the code looks.

    IMHO, Perl 6 is merely an employment continuation program for perl authors and training consultants. 5.8 doees more than everything I need and other languages fill in where perl is lacking (thr right tool for the right job and all).

Do you suffer painful hallucination? -- Don Juan, cited by Carlos Casteneda

Working...