Slashdot Mirror


Perl's Extreme Makeover

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.""

28 of 408 comments (clear)

  1. Perl: The Beginning by Anonymous Coward · · Score: 5, Funny

    a ,There's been
    a 0 an explosion
    a /|\ at the ASCII
    a | factory!!!!
    a /|

    1. Re:Perl: The Beginning by mrogers · · Score: 5, Funny
      now, you can look at the code and have a pretty good idea what it's doing.

      With the greatest respect, I think you're missing the point of Perl. If you can understand your code, the Indian programmer who replaces you can understand it.

  2. Perl Haikus by Anonymous Coward · · Score: 5, Funny

    Okay, about 99% of the Perl Haikus will not apply anymore.

  3. We're all going to die by StuWho · · Score: 5, Interesting
    "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...

    --
    "If you think nobody cares if you're alive, try missing a couple of car payments." Earl Wilson
  4. quick question.... by thepyre · · Score: 5, Funny

    "no one pretends for a moment that they're anything but hideously ugly," Does he mean the lines of code or the programmers themselves?

    1. Re:quick question.... by gUmbi · · Score: 5, Funny

      Yes.

  5. What everyone knows about perl by HappyCitizen · · Score: 5, Funny



    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

    --
    http://www.beyourowneviloverlord.tk
    http://www.frozenchickenthrowing.tk
    http://www.killercamel.tk
  6. Who would have thought! by Saeed+al-Sahaf · · Score: 5, Funny

    "hideously ugly" and "Perl" in the same paragraph? Who would have thought!

    --
    "Who are in control, they are not in control of anything - they don't even control themselves!" - Glen Beck
  7. Slashdotted. Here's the text by Bingo+Foo · · Score: 5, Funny

    Since the article is slashdotted, I have reprinted the text below:

    $_

    --
    taken! (by Davidleeroth) Thanks Bingo Foo!
    1. Re:Slashdotted. Here's the text by McCow · · Score: 5, Funny

      I can see what everyone is complaining about. Even jokes about Perl are hard to read.

  8. From the horse's mouth by ChaosDiscord · · Score: 5, Informative

    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, 2, 3, 4, 5, 6. On the down side, they are dense. Very dense. For that reason, I actually recommend Daimon Conway's Exegesis articles: 2, 3, 4, 5, 6. They provide alot more context on what the changes actually mean to you and why they're good.

  9. Re:Anyone who intimately knows 5 by smack_attack · · Score: 5, Interesting

    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

  10. Re:Expressions .. by Xzzy · · Score: 5, Insightful

    > .. 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.

  11. A picture worth 1000 words by Nugget · · Score: 5, Funny
  12. Re:Hmmm by __past__ · · Score: 5, Funny
    it's possible to write OpenOffice macros in Perl (Though it probably takes some nasty hacked API to do it)
    A nasty hacked API like, say, Perl, you mean?
  13. Re:Anyone who intimately knows 5 by psycho_tinman · · Score: 5, Informative

    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.

  14. Re:Ruby... by vt0asta · · Score: 5, Insightful

    ...provides almost all of Perls power, with none of the ugliness... [emphasis mine]

    ...or the online documentation, the unit testing facilities, the CPAN repositories, the portablility, or the developer community.

    Sorry, but you had missed some things that Ruby has none of compared to Perl.

    --
    No.
  15. Re:Anyone who intimately knows 5 by Telastyn · · Score: 5, Informative

    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.

  16. Re:why rev a language ? by furry_marmot · · Score: 5, Interesting

    Because it's a high-level language with lots of sytactic sugar that made a whole new level of flexibility in programming. You can be loose, sloppy, tight, properly formatted, or write one-liners with equal ease.

    I agree with the main topic that other languages aspired to its expressiveness. The problem, from the point of view of a Perl hacker like me, is that some of them have actually outdone it, primarily by creating similar power, expressiveness, and simplicity but without being so ugly *and* being OO. Ruby and Python are pretty much the motivators for the upgrade.

  17. Maybe OT but I don't get it... by mkaltner · · Score: 5, Insightful

    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

  18. Re:Anyone who intimately knows 5 by ChaosDiscord · · Score: 5, Insightful
    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.

  19. Re:No, Python by perlchimp · · Score: 5, Funny

    Java! -- Job Security!

    I am the lead developer on a 200K line commercial bioinformatics program written in Perl. That's job security.

  20. Re:Three cheers for Perl! by mortenmo · · Score: 5, Insightful

    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.

  21. Re:Trolling, maybe by rgmoore · · Score: 5, Informative

    You might be interested in Ponie, then. Ponie is the project to create a Perl5 interpreter for Parrot. It should let you get much of the speed benefit of the new virtual machine without having to learn the new Perl6 syntax. Of course you may still want to learn the new syntax, since it will add many powerful new features, but Ponie will ensure that Perl5- and all of the work you've put into your Perl5 scripts- won't be completely abandoned just because Perl6 has come out.

    --

    There's no point in questioning authority if you aren't going to listen to the answers.

  22. for the naysayers.. by psycho_tinman · · Score: 5, Informative

    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.

  23. Ever heard of comments? by cliveholloway · · Score: 5, Interesting
    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, I suppose.

    tch

    cLive ;-)

    --
    -- Trinity in high heels carrying a whip: The donimatrix - there is no spoonerism
  24. Re:Anyone who intimately knows 5 by Phillup · · Score: 5, Insightful

    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.

    --

    --Phillip

    Can you say BIRTH TAX
  25. Perl: A write only program language by xtronics · · Score: 5, Funny

    It is better to startover than to try and modify a perl script.