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.""
> .. 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.
...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.
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
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 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.
Search 2010 Gen Con events
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.
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