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.""
Good! Looks like they kept Perl5 in mind and it will flip into a special mode to execute older Perl5 code.
Nice!
-mb
a ,There's been /|\ at the ASCII /|
a 0 an explosion
a
a | factory!!!!
a
Okay, about 99% of the Perl Haikus will not apply anymore.
We might be able to actually use them in ten years or so... I do appreciate Open Source speed (done when done) and Perl is pretty complex but maybe they should have broken the upgrades into parts?
Is there anything better than clicking through Microsoft ads on Slashdot?
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
"no one pretends for a moment that they're anything but hideously ugly," Does he mean the lines of code or the programmers themselves?
.. 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
http://saveie6.com/
Will that make Perl 6 coders a different kind of "Parrot Head"?
The problem with socialism is that they always run out of other people's money. - Margaret Thatcher
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/Abo
http://www.beyourowneviloverlord.tk
http://www.frozenchickenthrowing.tk
http://www.killercamel.tk
...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.
do() || do_not();
"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
Since the article is slashdotted, I have reprinted the text below:
$_
taken! (by Davidleeroth) Thanks Bingo Foo!
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...
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.
I have been pwned because my
IIRC it's possible to write OpenOffice macros in Perl (Though it probably takes some nasty hacked API to do it). And of course, given how easy it is to embed a Perl interpretter into C apps (possibly moreso with Parrot) then there's really no reason why it can't be used for game scripts.
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.
Search 2010 Gen Con events
This pic says it all
Exactly why does a properly designed language need core revisions every year ? I thought that was what libraries were for!
This is not a signature.
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
free ipod and free gmail!
(perl[6] == "Great") || die;
...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.
Cypher: Oh that's not encryption... It's a new Perl script I'm working on...
The Matrix Bastardization.
user...
.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?
.NET to become without the "what are those bastards going to do to the platform" stench.
Is Parrot something akin to the JVM /
If I'm reading all of this right Parrot may well become everything Sun wants Java to become / MS wants
Of course, if I have the wrong end of the stick here I apologise. Perl isn't my strong suit.
I'm amused to see that the name 'Parrot', originally coined for an April Fool's joke over at O'Reilly, has now been used to christen the bytecode interpreter for Perl 6. Life imitating art I guess.
As for the 'extreme makeover' ... I hope it loses a bit of the excessive punctuation ...
[ UNSIGNED NOT NULL ]
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
You mean like:
Doc
http://www.ruby-doc.org/
http://www.rubycentral.com/book/
Unit Testing
http://testunit.talbott.ws/
http://www.rubygarden.org/ruby?RubyUnit
Library Repository
http://raa.ruby-lang.org/
Portability
Source compiles on anything vaugely Unix like
Windows binaries available
User Community
comp.lang.ruby
So, what were you on about again?
TODO: Something witty here...
Java! -- Job Security!
I am the lead developer on a 200K line commercial bioinformatics program written in Perl. That's job security.
Perl was first released in 1987. Y'know, I could've sworn the internet already existed back then...
(especially since Perl was released in a post to alt.sources)
Repton.
They say that only an experienced wizard can do the tengu shuffle.
I used to use python a lot. Still do, really. I like it a lot.
I just like ruby more. I find it easier to learn, even faster to code in, and language development is just as fast, if not faster than python.
TODO: Something witty here...
Finally, remember that most other Perl programmers will be in the same boat as you are in learning the new language, so Perl 5 should remain well supported for some time to come.
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.
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.
I have a small involvement with Parrot (e.g. I've contributed a few small, insignificant things, mainly fixes for Win32). It's not vaporware, it's just that designing a stable, efficient, multi-threaded virtual machine that runs on a wide range of different platforms isn't an easy task. You can go and do a CVS checkout of Parrot now and play with some of the toy compilers, or if you use Windows grab yourself the Parrot On Win32 compiled version:-w /
http://www.jwcs.net/developers/perl/po
The 0.1 release may be coming by the end of this month - and if this release isn't 0.1, I'm pretty sure the next one will be. That means Parrot has objects, some of the threading stuff is in place, JIT is working on various platforms and more. There's a lot of hard work going in by a lot of very good developers (not me!), and I'm confident that Parrot will be completed and will be a hot target for dynamic 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...
Your post is like arguing that Duluth is New York's equal because they both have buildings.
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!
Who is John Cabal?
Extreme makeover, nah.
Qeere Eye for the Perl Guy.
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.
:-) It's just not useful to anyone if it doesn't exist.
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
Use Ctrl-C instead of ESC in Vim!
No, I mean like:
..pales in comparison to...
...in addition to the mailing lists.
Doc
Something a little more thorough.
http://www.perldoc.com/
Unit Testing
Not just wrappers, but something a little more thorough and mature like say from executable to module.
Unit Testing
Library Repository
http://raa.ruby-lang.org/
http://www.cpan.org/
Portability
[Acorn] [AIX] [Amiga] [Apple] [Atari] [AtheOS] [BeOS] [BSD] [BSD/OS] [Coherent] [Compaq] [Concurrent] [Cygwin] [DG/UX] [Digital] [DEC OSF/1] [Digital UNIX] [DYNIX/ptx] [EMC] [Embedix] [EPOC] [FreeBSD] [Fujitsu-Siemens] [Guardian] [HP] [HP-UX] [IBM] [IRIX] [Japanese] [JPerl] [Linux] [LynxOS] [Macintosh] [Mac OS] [Mac OS X] [MachTen] [Minix] [MinGW] [MiNT] [MPE/iX] [MS-DOS] [MVS] [NetBSD] [NetWare] [NEWS-OS] [NextStep] [Novell] [NonStop] [NonStop-UX] [OpenBSD] [ODT] [OpenVMS] [Open UNIX] [OS/2] [OS/390] [OS/400] [OSF/1] [OSR] [Plan 9] [Pocket PC] [PowerMAX] [Psion] [QNX] [Reliant UNIX] [RISCOS] [SCO] [Sequent] [SGI] [Sharp] [Siemens] [SINIX] [Solaris] [SONY] [Sun] [Symbian] [Stratus] [Tandem] [Tru64] [Ultrix] [UNIX] [U/WIN] [Unixware] [VMS] [VOS] [Win32] [WinCE] [Windows 3.1] [Windows 95/98/Me/NT/2000/XP] [z/OS]
User Community
A little more world wide and established.
http://www.pm.org/
So, what were you on about again?
From the parent parent parent poster. "Ruby has almost all of the power of Perl, with none of the ugliness" isn't quite a fair statement, considering Ruby is lacking or behind on almost everything else Perl is superior at. Ruby is still playing catch up, and depending on who you ask, can also be considered ugly.
No.
...is the duct tape of the internet.
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/
The Parrot FAQ is worth reading. There are some really entertaining sections. One of my favorites:
Another:
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, which contained this:
steveha
lf(1): it's like ls(1) but sorts filenames by extension, tersely
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 tofuncof 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)
Free Software: Like love, it grows best when given away.
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.
.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.
.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".
The main difference between Parrot and
I have heard things along the lines of JVM and
Hope this answers some of your questions.
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.
a) Ruby uses brackets or end statements to delineate blocks, not indentation.
b) Why would anyone have a problem with this? Python code is remarkably easy to read and modify, primarily because there are no block delimiters to deal with. Maybe your editor is faulty?
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
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?
When all you have is a hammer, everything looks like a skull.
It is better to startover than to try and modify a perl script.
Ninety nine percent
of the Perl Haikus will not
Apply anymore
Abandon Perl! Python is the future!
My opinion is that anything that makes programs to design is a Good Thing. One problem I've always had with Perl is that when you sit down to do something significant, you run into all kinds of options. An embarrassment of options, really. Options that allow you to do the same thing several different ways, so there's no reason to choose one way over another.
This is what makes Perl so great for little knock-off scripts, but it can never be a serious contender for serious jobs because no two people have a reason to agree on how to accomplish any given complex task. Code readability is out the window. Transfer of knowledge goes down as TCO and maintainability goes up. The object of Perl's game was to provide an extremely terse way to do little things...but let's keep in mind that terseness only works to deal with the little problems.
Having said that, if the new release can maintain Perl's legacy and give us a way to encapsulate terse solutions to small problems, but in a structured, regularized way, then we might just get the thing we need. Done correctly, any big problem can be sensibly solved in the new Perl by breaking it down into a bunch of little problems. Each little problem solved tersely, understandable on its own, connected together with a somewhat less-terse but sensibly high-level structure...sounds like most OO solutions to me and a good thing for Perl.
sev
but have you considered the following argument: shut up.
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...
-- If no truths are spoken then no lies can hide --
If that sucker can output it's own code and send and e-mail too then, AND ONLY THEN, is it a true perl program.
Comparing it to Windows will be a moot point, since El Dorado is going to have a 40% larger code base than XP.
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.
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.
Vino, gyno, and techno -Bruce Sterling
Here's an idea: get over it. It isn't that big of deal, and either choice is vastly more readable than perl.
Let the flames begin!
There is much pleasure to be gained in useless knowledge.
I'm not sure how "Healthy, readable code with sensible naming conventions and a clear structure" explains to you at a later date why you coded as you did. If you had to write something that looks out of place to deal with some legacy code you inherited, I'm sure you'd psychically pick that up just by glancing at the code. Or perhaps you go round naming vars something like $quirky_flag_to_pick_up_strange_situation_caused_b y_bad_code_in_package_X?
And what if someone less experienced than yourself has to maintain your code at a later date? Something that may seem obvious to you may be off of their radar.
If you never have to ask why and no one less intelligent than you ever looks at your code you either are very very lucky, very stupid or unemployed.
.02
cLive ;-)
-- Trinity in high heels carrying a whip: The donimatrix - there is no spoonerism
Well, the only valid point on your list is the large selection of Perl libraries. But that's like saying Windows is better because thousands of programs are available..
Not quite analagous, because that also means your definition of "better" for Ruby is like saying MacOS is better because there are fewer programs available.
For instance, docs and unit testing are pretty much the same in Perl, Ruby, Python, PHP, Java...
I must have screwed up my terminology. The unit testing I am referring to, is the built in stuff that comes with the Perl build process, the module build process, etc. Perl is second to none in testing. I would agree Perl, TCL, and Java docs are similiar in completeness. When I say complete, I mean documentation on how to embed and extend is available, is thorough, and all the intricacies are spelled out. Ruby, Python, and PHP are lacking. For example, at my command line I can type: perldoc perlxs, perldoc perlapi, perldoc perlembed, perldoc perlguts, and I have 10x more information about the innards and what is going on than the other languages.
The Perl and Python communities are full of people trying to show off.. it gets old after a while.
Not sure what you mean by show off. Ruby coders seem to be just as desperate as Python coders to demonstrate how their language is almost as powerful as Perl. When Ruby clutches the title of being the swiss army chainsaw in the industry, I think Ruby too, will have a reason to "show off".
One great think about Ruby community though, is that it's still small and friendly.
One awful thing about the Ruby community is that they pipe up about how they are almost as good as Perl whenever Perl is mentioned.. it's offtopic, untrue, and gets old after a while.
No.
*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.
Your hair look like poop, Bob! - Wanker.
There are a lot of reasons but the short answers are regexes and the fact that non-programmers can get started quickly. Plenty of sharp minds think "If I could only sort throw this text and do this...." Perl lets them do that. You'd be amazed at the biology you can uncover with 50 lines of code and 50 megs of sequence. (If they don't 'use strict' though, plenty of comical things can happen.)
I didn't even know it existed. What books/resources should I read if I'm going to stick with perl 5?
Almost every language has text processing capabilities. Here's a dirty little secret most people don't know . . . regular expressions for bioinformatics work is not as important as people would like you to believe. The fact of the matter is, most of the data bioinformatics researchers encounter is structured data. Simple string parsing and tokenization is all that is needed. Regulars expressions past the most simple are rarely encountered. In fact, a lot of the data a bioinformaticist encounters is in either XML, tab-delimited, or CSV. For the text processing part of my tasks, I have often used awk to blow my way right through a text file. Of course perl can do the same thing, but I'd like to point out that awk is great when so much of your data is in tabular format (we've got databases everywhere in this field). I also find Java's String, StringTokenizer, BufferedReader and Writer mixed with the FileReader and Writer classes to work great with text files too.
This brings me to my last point. Perl is horrible for some areas of bioinformatics. A lot of people employed in so-called bioinformatics positions spend like 90% of their day parsing through text files. Most people don't know that there are bioinformaticists who spend very little of their day doing that, but instead are developing algorithms and such that usually require a different language. For instance, I'd hate to run a Hidden Markov modeler with the Viterbi algorithm coded in Perl :) Or how about a massive simulation during haplotype reconstructions in perl? Or maybe a support vector machine in perl? Hee, you get the idea. For these tasks C is often chosen. Particularly if one employs parallel programming. I encourage bioinformaticists to explore other languages besides perl so that they have a vast array of expression for the multi-facted charges a computational biologist is expected to handle.
lameness filter won't let me space the comments neatly, but I'm sure you get the idea.
.02
cLive ;-)
-- Trinity in high heels carrying a whip: The donimatrix - there is no spoonerism
Thank god threading is at the top of the list.
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.
No, I did not read the f***ing article!
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).
"I'd rather be a lightning rod than a seismometer." -Ken Kesey
They should be replaced by something better, such as Xerox' Extended Regular Relation Calculus: Here are some examples.
The nice thing about it is that it's fully declarative and bi-directional, i.e. a:b can be applied substituting a by b or vice versa (if run backwards), whereas the traditional
pattern-action paradigm that Perl has inherited from awk is only partially declarative (only the pattern).Another interesting property is that xfst, one of Xerox' compilers, allows naming and re-use of subexpressions:
(all without any ugly '$'sAbstraction by naming is a powerful feature, as Abelson and Sussman (SICP) and other good elementary textbooks point out.
Maybe anybody wants to volunteed to build something like this into Perl6 instead?
My biggest Perl project is a 5KLOC Perl module. I don't know if that make me qualified to answer your question, but here's my 0.02$ : best practice for large-scale Perl program are the same as with any language. A few :
1. Use descriptive name for variables, functions, objects, etc. Stick to a convention here.
2. Also stick to a coding standard (brace style, ident, etc).
3. Write good comment, but don't overdo it. Especially true for regexp, where you should describe what you want to match and what constraint you take into account.
4. The most important: generalize as much of your code as possible into object or package.
5. A corrolary of 4 is to re-use existing library. Search CPAN and prefer well-known package over more obscure one.
The only Perl-specific advice I would have is to avoid obscure and lesser-known Perl construct such s compiled regexp, closure, use of local(), etc. If you do use one of these construct, explain the purpose of doing so in a comment, and give pointer to documentation on the subject if appropriate.
:wq