Perl 6 Now by Scott Walters 366
Joseph Brenner writes "Every now and then, a beginning programmer asks if there's
any point in learning to program in Perl 5, when Perl 6 is
going to change everything soon. There are a number of
answers to that: one is to point out that Perl 6 is still
years away, another is to point out that it is promised that
Perl 5 code will run under Perl 6 without modification (a
module that begins with the traditional "package" statement
is Perl 5 code; if it begins with the new "class," then it's
Perl 6)." Read on for the rest of Brenner's review of Scott Walters' Programming in Perl 6 style using Perl 5, a book which answers that question a whole different way.
Perl 6 Now | |
author | Scott Walters |
pages | 379 |
publisher | Apress |
rating | 7 |
reviewer | Joseph Brenner |
ISBN | 1590593952 |
summary | Programming in Perl 6 style using Perl 5 |
Scott Walters here pursues what might be thought of as the third answer: you can learn Perl 6 now and immediately begin writing programs in a "Perl6ish" sort of way, using appropriate CPAN modules that have been used to implement approximations of Perl 6 behavior: Perl6::Variables, Perl6::Export, Perl6::Contexts, autobox, Perl6::Classes, Switch, and so on.
There are many caveats about using these tricks in production code, however, and Scott Walters doesn't shy away from warning you about them (e.g. p.43 "Source filters are dangerous" where he discusses their increased start-up overhead and potential bugginess -- though he doesn't mention my own peeve which is that they're very confusing when you try and use the Perl debugger).
So possibly the book is not really quite so well suited to an actual beginner-- who probably should not be told about "use Switch 'Perl6'", but the device of spending the early stages of the book directed toward a beginning audience makes it a very useful review for people like myself who have been reading the Apocalypses, but don't remember every detail.
And on the other hand, the book includes some prominent early warnings about common gotchas that beginning programmers seem to be prone to -- e.g. using dynamically defined variables instead of just using hashes.
The standards for writing English in the Perl world are pretty high -- the core members of the Perl community have always cared a lot about clear writing, and it's arguably the world's best documented language (critics will no doubt add that it needs to be). Unfortunately, I can't say that Perl 6 Now quite lives up to this standard. This is a book that was written in a hurry, and it shows: hasty sentences and minor organizational problems abound (e.g. one or two items seem to be discussed in the wrong place; there are an awful lot of explicit forward references, and yet there's at least one place where something was used in an example before being discussed a few dozen pages later). But then in Scott Walters defense, this is certainly a book that needed to be written in a hurry, because its subject matter is such a moving target.
And where the book really shines is in its code examples: short, clear and to the point; the author repeatedly shows how something can be done in Perl 5 code and how it's expected to work in Perl 6. These examples are always clearly labeled "Perl 5" or "Perl 6" in the comments, so that the two can't be confused.
The subjects of some of the examples are pretty cool: e.g. he talks about using PDL ("Perl Data Language") to crunch audio data in MOD format, which I was completely unfamiliar with. A *.mod file essentially contains the "sheet music" for multiple parts (really, MIDI) plus sound samples that specify how notes will sound for each voice. This is discussed in Chapter 7, which is also the free sample chapter. I also liked random walking Arizona's highways as an example of Graph navigation (Chapter 8, p 159), and I appreciate the fact that he downplays inheritance in favor of delegation in his discussion of objects (Chapter 14, p. 262).
All in all, this book is a fun read for the Perl fanatic.
(Note: the title Perl 6 Now bears a strong resemblance to an emacs package I've been working on called perlnow.el, but there is no relation.)
You can purchase Programming in Perl 6 style using Perl 5 from bn.com; it's also available in eBook format (password protected PDF, using your email as password) for $15. Source code and and a sample chapter are available online: Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.
PHP5! (Score:5, Funny)
Re:PHP5! (Score:2)
Re:PHP5! (Score:4, Funny)
Who would want a language that had its own mediocre congressional television station?
Re:PHP5! (Score:3, Informative)
Yes, it's called PEAR [php.net]: The PHP Extension and Application Repository.
Re:PHP5! (Score:3, Insightful)
Jeremy
Re:PHP5! (Score:2, Interesting)
Look, I'm violating patents! [slashdot.org]
Re:PHP5! (Score:2)
What annoys me is (Score:2)
PERL is very scripty and cgi'y. I used PERL (sorry perl) while doing some basic CGI about 6/7 years ago.
Never used it since. Have used PHP since... don't use either. All Jsp, Java SE, JSF and Python now.
PHP5? (Score:2)
Forward references (Score:2)
Are these always bad? I've been having the same trouble with PMD Applied [pmdapplied.com]; when I'm in an earlier chapter babbling about the XPath rules it seems really convenient to say "and if you want to learn how it _really_ works, check chapter 9 for a nuts and bolts description of DocumentNavigator and AxisIterators and all that". But I hesitate to add notes like that because folks don't seem to like them. Seems handy at times, though...
Re:Forward references (Score:2)
10 MOL = 42
DO 20 I = ID+1, X
X = H * 0.5
SUM = SUM + F(X)
20 CONTINUE
IF (
Re:Forward references (Score:2)
Well no, of course they're not always bad, and they're certainly not always avoidable... no subject is easy to completely linearize the order of presentation, and even mapping one to a hierarchy can be pretty tricky. A lot of them can be pretty irritating/confusing though, and in general you try and minimize them where you can in technical writing.
Have you heard Larry Wall's story about
Clear writing (Score:5, Funny)
Yeah, right. Why should one obfuscate English, Perl offers much more possibilities to do so.
Re:Clear writing (Score:2)
And that's what's wrong with the standard Perl books too. They don't resort to the nasty clunkspeak that's standard for bad technical writing. But neither do they write well. There are too many humorous asides, the material is not well-organized, an
CPAN (Score:5, Insightful)
It is a great language, and has been used successfully by many huge companies (Amazon for one), but I think if those companies had to redo it again today, I don't think they would choose Perl again. I think that purely as a language, it has been surpassed.
Having a large, mature 3rd party library is what is hampering the adoption of some of the up and coming languages.
Re:CPAN (Score:5, Insightful)
My own experience suggests this is absolutely true. I learned a bit of Perl in 2000, then had a look at Python, and realized that 90% of what I wanted to do, no matter what I wanted to do, was already implemented in Perl modules. Python, in contrast, had a a much, much smaller collection of stuff available. Despite certain nice features in Python, the abundance of pre-existing native functionality in Perl won the day for me.
One could argue that Perl functionality can always be called by other languages, but I have extensive experience in mixed-language programming (C/FORTRAN, C++/Java and Perl/C++) and don't really want to deal with the debugging nightmare that it often entails. So given that I could do everything I wanted to in Perl and still live by Booch's Rule 122 ("Never write code unless you absolutely positively must"), Perl was the clear choice.
The only likely replacement for Perl is Perl, as Perl6 will be able to draw on the huge community of Perl developers who have a vested interest in keeping the language alive and flourishing, and it is very likely that debugging from Perl6 into Perl5 will be relatively seamless.
Re:CPAN (Score:2)
Re:CPAN (Score:2)
I'm pretty sure it's been a while now - I had a conversation with a recruiter from Amazon about perl around 6 years ago (and it was their main language then).
Re:CPAN (Score:2)
Perl 6, on the other hand, might be able to use my Perl 5 objects, along with some Java, C, python, brainfuck, etc. libraries. If it gets to that point the bar for all other languages will have been raised, including
Re:CPAN (Score:2)
But is that a problem with those other languages, or with Perl?
Moving from Perl (slightly OT) (Score:3, Interesting)
First, I'm not really a programmer. Not professionally, at least. I've been writing Perl for about four or five years, though. I'm not well-versed in OO and I'd like to be. I've just found it such a stumbling block in Perl and that's probably because I'm doing in Perl in the first place. It's the first language I picked up since I played around with BASIC and Pascal as a little kid.
I run a large auction site. Maybe 40,000 members. I wrote the entire engine (auction, forums - everything) in Perl. But it's getting complex and difficult to maintain as it is. And the performance is not holding up. I could move to mod_perl, but rather than re-writing everything (and possibly doing so in OO), I thought I'd just write it in another language.
I don't want PHP. So that leaves me mostly with Python and Ruby. I've done a lot of reading, but am not sure which would be more appropriate. I think Python might stick me back in the old "easy to do things wrong and blow your foot off" world of Perl. Ruby on the other hand would probably help me gain a better understanding and real-world use of OO.
Performance is an issue. So are available packages. My backend is postgresql and I need whatever language I use to have an extremely capable and flexible and mature postgresql DBI.
At the moment, I have to say I'm leaning toward Ruby. But it does seem that Python might have more mature packages available to it and be a bit more widely used. I'm just skittish because everything I've heard has given me the impression that it's very Perl-ish and if I'm going to be in that world, I might as well just stick with Perl in the first place.
Thoughts?
Re:Moving from Perl (slightly OT) (Score:2)
Re:Moving from Perl (slightly OT) (Score:2)
There are two ways to port an existing application to mod_perl; the fast way and the proper way. The fast way is essentially to take your entire existing application and make it one giant function within mod_perl. Try a quick basic port and see how much better your site performs once you do. I think you'll be
Re:Moving from Perl (slightly OT) (Score:5, Insightful)
First, I'm not really a programmer.
I wrote the entire engine.
But it's getting complex and difficult to maintain as it is.
And the performance is not holding up.
So you're admittedly not a very experienced programmer, and you're expecting to have the web logic engine that you built, presumably from scratch, be scalable and modular, without ever refactoring it? In programming, we call the kind of query you just gave a 'silver bullet' problem, and unfortunately, there is none in this case. No one language, or framework, for that matter, is going to fix problems inherent in poor design. That's not to necessarily denigrate your programming skills, but don't expect that rewriting an app that was developed from scratch and is exhibiting growing pains to see great speed and modularity gains by porting it to another language. I've got a good hunch that if you started all over again, still using Perl, and chose your toolset wisely, your app would be more stable, scalable, functional, and modular.
I've worked with a lot of web languages/frameworks, and yes, Ruby would similarly solve the problem, but please don't ever say "real-world use of OO" with regard to Ruby. Rails is what, a year old? Basecamp and 43 Things are the largest sites actually running Rails (the latter being as esoteric as you can get, and pretty low-traffic, at that), and you're not going to see a major player using Ruby at this poing. If I take your meaning of "real-world" correctly, CORBA is more like what you're talking about, though I don't think you necessarily want to mess with that sort of thing right now.
Re:Moving from Perl (slightly OT) (Score:2)
I have to agree. If you've got 40K members now, you have a lot to lose, and trust me, unless you hire an experienced team to replace your code, you probably will lose a lot of them when you transition to a new code base. There is a lot of sunk knowledge in that code, and you've probably forgotten why some of the spagetti was actually mostly a good idea at the time. So take it apart slowly.
Bring up a stage under mod_perl, and see what breaks.
Re:Moving from Perl (slightly OT) (Score:2)
One of the things I've been learning lately, is that with Perl, there are ways to optimize it. I'm not second guessing your proficiency with perl, but if I was in your shoes, I have an idea what I would do.
Have you ever thought of open-sourcing your engine? If some of the gurus come by and optimize your code, you would benefit immidiately and learn quite a bit in the process.
Again, I don't know how
Re:Moving from Perl (slightly OT) (Score:3, Insightful)
From the standpoint of integrating a website/database, the database will always be your substantial performance bottleneck, unless your code is utter garbage. PHP, Python, or Ruby are all adequate for this task.
The biggest thing you can do for performance is design a Normalized database, and to make sure there is proper indexing
Re:Moving from Perl (slightly OT) (Score:2)
Re:Moving from Perl (slightly OT) (Score:2)
Some years later, I happened to try out Python for a project and fell in love. I find the syntax ea
Re:Moving from Perl (slightly OT) (Score:2)
Show some "unreadable" Perl code or shut up (Score:5, Insightful)
Everyone attacks Perl code for being unreadable but I don't think I've ever come across real world Perl code that I couldn't manage to deal with (eventually). I've seen some bad code and written some bad code and Perl doesn't have exclusivity in either of those areas. ;)
Does someone have a good example of unreadable, real world Perl code? And I don't mean obfuscated Perl contest entries.
When it comes down to it, other people's code is just freakin' unreadable no matter what they write it in. In fact, my own code looks unreadable and unmanagable if I haven't seen it in awhile. Just the nature of the industry.
Maybe Perl is just a high profile target since the internet is full of small (and useful) pieces of Perl code?
Re:Show some "unreadable" Perl code or shut up (Score:2)
Which is why people should always, always comment their code. Yet, how many do?
Re:Show some "unreadable" Perl code or shut up (Score:2)
The comments are included in the "unreadable" part.
Re:Show some "unreadable" Perl code or shut up (Score:2)
Re:here you go (Score:2)
Friend, you don't have a perl problem. You have someone who needs to be removed from the project, or at the very least, whacked on the head with a data structures book every time they try a new interpolation trick out. And steal their perlmonks password and lock the account.
Perl6 is closer than you think (Score:5, Informative)
for a working perl6 compiler. Yeah, it is not yet feature complete, but progress is very rapid.
Perl6 is really amazing. It removes most of the worst parts of perl5 and make things even easier on the programmer. If you do an research at all you can find that.
Some people are even starting to port important CPAN modules to perl6 and discovering how much a pleasure it is to use.
see http://www.perl.com/pub/a/2005/07/28/test_builder
as an example of that.
btw, check out the example code. for all of you who think perl5 looks like static on a tv screen, you will be pleasantly surprised I think.
peace
Re:Perl6 is closer than you think (Score:2)
(P.S.: the "say" function is a new thing in Perl6)
Re:Perl6 is closer than you think (Score:2)
For the fanatic (Score:2, Insightful)
I love and use Perl. But the grammar is already rich and varied. Throwing incorrect Perl6 code into the mix is going to make Perl5 code even harder to read. I sure hope not too much of this stuff makes it onto CPAN (although I know some of it already has).
Perl (Score:2)
I for one, welcome our perl-loving overlords. (and the book, too!)
Re:Perl (Score:2)
I used to use Perl, now I'm only doing RoR (Score:5, Funny)
So I switched to Ruby on Rails this morning, and I'm so productive, that its sick. Within 5 hours, I have a Firefox extension running on my AIX workstation that can run most Win32 software... Photoshop, Outlook and Half Life 2 work ok, although I only get 40fps with HL2. (I'm working on that)
After dinner I'm going to reproduce every module in the CPAN library, which I estimate will take approximately 2.25 hours. I can't wait!
about package statement (Score:3, Interesting)
Re:about package statement (Score:2)
Re:about package statement (Score:2, Informative)
Then run it with Ponie [poniecode.org] or your existing Perl 5 compiler, or add package main; at the start if you change your hash-bang line to /usr/bin/perl6 instead of /usr/bin/perl.
The point of the check is to re-use modules, not standalone scripts, so that you can migrate your code to Perl 6 gradually.
Why is Perl so hated? (Score:4, Insightful)
When you really get down into the guts of perl, you get to do all kinds of crazy nifty things with XS, AUTOLOAD, regular expressions, etc. Perl's syntax is such that once you're intimately familiar with it, you can be either very expressive or very concise.
A lot of code ends up going the concise route because when you know what you're doing, it's easier to write (less keystrokes). Then perl newbies / passer-byers take a look at it, don't understand it, and freak out and say that perl is crap.
Then perhaps they're threatened because there's a huge community of smart perl programmers that manage to upstage them constantly.
To zoom out on the issue a bit, I'm really sick and tired of this current movement in computer science where so many think that programming should be made into some kind of simple task that anyone can do. Hence you end up with languages like Java that hold your hand really really tight and refuse to let go. Is Grandma writing software really a good thing? Or should we save it for the people who at least have a passing familiarity with computers & networks; hell, someone who might even know a little bit about the basic mechanisms in a typical UNIX kernel?
(I refuse to drive a car built out of legos... I don't care that the technology enabled your three year old to do it... it's a high speed highway, damnit, and my life is on the line!)
Make no mistake - there's still an undergound of brilliant developers that understand their systems inside out and produce amazing, high performance code. Many of them are in the open source community. And we refuse to let go of our power tools. You may use whatever language you like, but expect a well-deserved ass kicking if you get in our face and try to tell us you know better.
Re:Why is Perl so hated? (Score:3)
Fewer keystrokes should not be a design goal of a language. Do you remember the first time you wrote a C program, and you named your first variable 'a', your second 'b', until you got up to say, 'l' or so, and then you realized that you saved a lot of keystrokes but it wa
Re:Why is Perl so hated? (Score:2, Interesting)
Your objection is silly and I think it's because you focused on variable names at the expense of what Perl really tries to optimize, Huffman-wisee. The driving question of Perl (and especially Perl 6) design here is "Why should common operations require a lot of syntax?" In English, why should words such as "he", "she", "I", "you", and "it" be short instead of long? Why is say a better keyword to print a string with a newline attached than pr
Flame On! (Score:3, Funny)
In fact it's quite amazing how long this quirky relic of ancient Unix paradigms managed to survive. It's 2005 and Perl _still_ is taken for granted as a PL. That's a terrific feat!
The only PL in the same demografic group that is still in use is SQL. An
Re:Flame On! (Score:4, Interesting)
I prefer programming in Perl to Python. This is primarily because Perl has better variable scoping, which combines nicely with "use strict" and "use warnings FATAL => 'all'".
In Python, there are two scopes for variables: Global and Function. In perl, any { block } gets it's own scope for "my" variables. This means that temporary variables disappear when you're done with them rather than sticking around clogging up memory and name spaces. Because perl has variable declaration statements (my, our), it can check at compile time to make sure you have no typos in variable names. In python, any time you do an assignment you might be declaring a new variable - and you'll never know until you get incorrect output.
Also, Python has no do...while(). This gives you the amazing choice of duplicating program logic (awesome when you change only one instance later) or putting in a "while 1:" - rather than knowing where the loop condition is, the maintnence programmer gets to randomly guess *and* this opens the way for "sometimes the loop never ends" bugs. Not good times.
I'm looking forward to Perl 6 where it will be possible to have semi-static typing. That will mean even less code that compiles but doesn't work. I really wouldn't want to be using a language without similar features for any sort of non-trivial software project.
Re:Why is Perl so hated? (Score:4, Insightful)
And in a way they are right: Perl is crap for RAD by now compared to other languages.
Then perhaps they're threatened because there's a huge community of smart perl programmers that manage to upstage them constantly.
Yeah, the zealots and their praises are probably one the main reason for the hate against perl. Its just not that good as the zealots claim. Thus people are disappointed.
To zoom out on the issue a bit, I'm really sick and tired of this current movement in computer science where so many think that programming should be made into some kind of simple task that anyone can do.
That sounds so elitist it hurts. But yes, programming should be as easy as possible, but not easier.
Hence you end up with languages like Java that hold your hand really really tight and refuse to let go. Is Grandma writing software really a good thing?
Grandma uses VisualBasic or PHP, but not Java. Oh, and its a lot better when Grandma writes software in Java than in PHP or Perl.
Or should we save it for the people who at least have a passing familiarity with computers & networks; hell, someone who might even know a little bit about the basic mechanisms in a typical UNIX kernel?
No. Your Perlcode might even run on a Non-UNIX System - this is one of the reasons to use Perl, Python, Ruby or Java.
So you prefer to use a very powerful old car without any safety measures, because "you can handle it". Yeah, right.
Make no mistake - there's still an undergound of brilliant developers that understand their systems inside out and produce amazing, high performance code. Many of them are in the open source community. And we refuse to let go of our power tools. You may use whatever language you like, but expect a well-deserved ass kicking if you get in our face and try to tell us you know better.
Uhhh, Im scared. You really remind me of this guy: http://www.pbm.com/~lindahl/real.programmers.html [pbm.com]
Those who live by the sword get shot by those who don't. [bash.org]
Re:Why is Perl so hated? (Score:2, Insightful)
Re:Why is Perl so hated? (Score:2)
All of my complaints with Perl are really complaints with scripting, and 'use strict' and packages really take care of most of that.
Re:Why is Perl so hated? (Score:3, Insightful)
Of course it turned out that I was competely wrong. I was sitting down to dinner with a friend, and he was going on and on about all the different ways the vari
Re:Why is Perl so hated? (Score:2)
Back to the original question: I hate Perl because: if I don't use it for a little while (couple of months), I can't program in it without cracking a book. I program in a LOT of other languages, ocassionally, and I don't have this problem with any of them.
Re:Why is Perl so hated? (Score:3, Insightful)
Because when I said (1,2, (3, 4)) I really actually truly wanted a nested list, but Perl happily flattens it without warning. (Note: I know about references -- minefields suck even if you know where the mines are).
Because I am tired of sloppy, legacy syntax like auto-quoting of barewords in some contexts, and the stupid hacks it takes to work around them (like prefacing constants with +).
Because I want objects and inheritance, not blessed hash references and @ISA.
Because I want to be abl
Re:Why is Perl so hated? (Score:4, Insightful)
I like the part where Larry is describing the thing a reference refers to, which is termed a "thingy, in honour of the thingy that hangs down the back of your throat". Then there's a footnote that says "You could also call it a 'referent', if you prefer a joyless existence."
Python zealots always strike me as the type of people who'd call it a 'referent'.
Obligatory (Score:3, Funny)
And still use Perl.
Ruby is Perl6 Now! (Score:2)
Who cares about programming languages? (Score:2, Insightful)
Look at the difference between a bad, a good programmer and an excellent programmer. We're talking 1 to 2 to 10 factors in productivity and quality here, easily.
Programming languages? Unless it's a language (or programming paradigm) the programmer doesn't know (in which case it doesn't matter much whether it is Java, C, C++, Perl, Python or ruby) at all, the difference for the same programmer from one to another may exist (depending
Re:Perl 9 is already out... (Score:2, Interesting)
Re:Perl 9 is already out... (Score:2)
They beat you to the punch, a long time ago now.
Re:Perl 9 is already out... (Score:2, Funny)
Would you care to provide any reasons for switching to Python?
Holy wars such as Perl vs Python are typical but altogether unneccecary. Both Perl and Python are maturing and are now sophisticated languages. Furthermore, they are suited for different things. For example, if I were writing a program that needed advanced string parsing, I would use Perl. If I was writing a graphical game, I would use Python. If I was writing a CGI script, I would use Perl. If I was writing a program that described various obj
Re:Perl 9 is already out... (Score:2)
There is no reason to get so defensive about these things with the exceptions of Windows vs Linux (Linux) and Emacs vs Vi (Vi).
Re:WORD (Score:2)
One of the things that I appreciate when reading Other People's Code (which you kind of have to do in the Zope/Plone world, and for good reasons: the projects are young, there are a lot of changes, the source code are mostly readable and commented, and the major things are documented any way) is that you can clearly see at the top of the file what else is used in the curent file. And if you want to dig things deeper, you just look in the referenced file.
And really, when you compare,
ACHOO (Score:2)
Re:I hate Perl. (Score:2, Funny)
What is the output of the following?
"Be Sure To Drink Your Ovaltine." What the...?
Re:I hate Perl. (Score:2)
Re:It's a php/perl post! (Score:4, Informative)
Well, for one, perl now has a nice framework similar to Rails called Catalyst (http://catalyst.perl.org/ [perl.org]). It's a lot closer to Rails than a lot of other languages' attempts to clone Rails. And yet the Catalyst dev team have specifically chosen to diverge from Rails in certain areas, trading a bit of simplicity for complete flexibility, avoiding some limitations you could run into in Rails.
Apache and Rails (Score:2)
Re:Clarity (Score:2)
Re:Are people still using PERL? (Score:2, Informative)
Re:Are people still using PERL? (Score:3, Informative)
The same goes for Java.
Bash and Awk are not powerful enough to do some of the jobs Perl can do. And Perl is only slow with some things, and in comparison to really serious languages like C/C++.
You mean slashdot isn't based in Poland? (Score:2, Funny)
Re:Pointless Perl6 (Score:4, Informative)
Perl6 [wikipedia.org] is actually built from user feedback, for the first time.
From wikipedia: Larry Wall, the creator of Perl, has called Perl 6 "the community's rewrite of Perl", because he has based the changes largely on 361 "requests for comments" submitted by the Perl community in 2000. He is outlining these changes in a series of long essays, called Apocalypses, which are numbered to correspond to chapters in Programming Perl ("The Camel Book"). The current, unfinalized, specification of Perl 6 is encapsulated in design documents called Synopses, which are numbered to correspond to Apocalyses.
Parent is NOT insightful.
Re:Pointless Perl6 (Score:2)
Re:Pointless Perl6 (Score:2)
Have you read up on Perl 6? I've done some very extensive reading, and I'd suggest you check out the wealth of new features and concepts before making such an outlandishly foolish claim.
Like you I read the Perl 6 updates when they come across the news sites. I have tried to wade through Larry Wall's obtuse bullshit. I stand by what I said. Perhaps you enjoy waiting years for vaporware to materialize. You must be a Hurd user. My guess is you will never see Perl 6. But I doubt whether Perl 6 will advance
Contrarian View (Score:2, Insightful)
PERL5 is (relatively) compact. It does what it needs to do. I can quickly write fast and compact programs to do dirty tasks like extracting data from a log file. Moreover, I can easily decipher another person's PERL program.
Attempts to bloat PERL to include every conceivable widget is little more than an ill-advised attempt to morph PERL into a full-blown development language (e.g. C#) for creating million-line programs.
Re:Pointless Perl6 (Score:2)
Though I think I would have just preferred if they added continuations and what not, cleaned up the guts some too. Damian had a proposal for this I believe called Perl 5i
Re:YES YES YES!!! (Score:2)
Re:Attracting new users, competing with Python? (Score:4, Informative)
Jedidiah.
* One of the things I like about Python is that they're willing to deprecate and then *remove* features to help combat cruft.
Re:Attracting new users, competing with Python? (Score:2)
(Still writing Ruby, still liking it.)
Re:Attracting new users, competing with Python? (Score:2)
As an aside, variable declaration is something Python does manage (there's no "use strict" - it
Re:Attracting new users, competing with Python? (Score:2)
Re:Attracting new users, competing with Python? (Score:3, Informative)
Not everyone buys into 1, 2, 3, 95, 98, 2000 type
numbering schemes
perl 6 should be the last major number and the versioning should approach 2pi
whitespace (Score:2)
Actually, whitespace is significant in virtually all modern languages. It's just that this isn't enforced by most language specifications.
(If you doubt this, try randomly reindenting a piece of code to observe how this destroys its readability.)
Mike
No, there isn't. (Score:2, Troll)
Perl vs Python is sort of like MySQL vs PostgreSQL: each of the former was once useful, but now there's an alternative that is so much better, why handicap yourself?
Re:No, there isn't. (Score:2)
Just as Perl gives you the power and expressiveness of Python, but with more freedom to code the way you want, rather than the way some whitespace fanatic wanted?
I don't think I've ever met someone who liked coding in both Python and Perl. Thankfully, having both around doing fabulously doesn't hurt anyone
Re:No, there isn't. (Score:3, Insightful)
Yes, I'm quite familiar with Python. I prefer perl. My code looks good because I know how to program, not because the language forces me to indent. Changing the name of a hash to a dictionary, an array to a list, and makin
Re:Is there a point to Perl any more? (Score:5, Interesting)
Well, it went just fine. I haven't written a single line of Perl since that day, and I haven't missed it one bit.
These days, with so many options available, I think Perl appeals to a certain kind of developer in much the same way Java does. You don't really NEED it, in the sense that many other things can do the same job... but it's a point of style. Java and Perl now serve primarily as focal points for very small and specific communities that otherwise wouldn't really exist in a coherent fashion, much like APL or Objective-C. Ruby is similar, and I don't really see it going mainstream. These sorts of niche technologies still do the job, and selecting one of them instead of a more "mainstream" language like PHP or C++ identifies you as a particular kind of person.
Actually, I'd say that (Score:4, Insightful)
Re:Actually, I'd say that (Score:2)
Re:Is there a point to Perl any more? (Score:3, Insightful)
So, if you want a language for scripting 9in the sense that most people with little scripting experience think of it), you might want to avoid perl. If you want a language to elegantly encode brilliant ideas in a short space, go for it.
Re:Is there a point to Perl any more? (Score:2)
I would say that Perl i
Not from my point of view (Score:2, Troll)
Re:Perl: Lead Painted Asbestos Toys for Tots (Score:3, Funny)
Every time you post a message to this website, you're using Perl. You'd better stop before you foolish irresponsible behavior catches up with you.
Re:Perl's only real advantage is job security (Score:2)
You may be, but if this is your attempt at clarifying, it does little to prove it.
Re:Help Me Here... (Score:2)
If you are starting something new use Python.
that can be used to parse complicated log files and security scans
This is traditional Perl terrain because Perl is more or less Regexps and a little bit around it. However, in Python you can use regexps aswell and the stuff around it is much cleaner and easier to "grasp and learn". Perl has the motto "there is more than one way", which makes fast hacks eas
Re:Help Me Here... (Score:2)
Both Perl and Python are multiplatform.
Both Perl and Python can use the GTK, Qt and Tk GUI toolkits. Perl and Python only have support for Qt3, so there's no GPLed Windows version of Qt for these languages. Tk's always struck me as ugly, so GTK seems the best choice. It's what Bittorrent uses.
Bittorrent used to use wxPython, a python wrapper around wxWindows, another GUI toolkit. Though wxWindows has always seemed a bit flaky to me.
Both Perl and Python have ODBC module
Depends (Score:3, Insightful)
Perl is for weenies who want to feel superior because their language can be write-only.
I prefer Perl, myself. The few times I've used Python, I've hated the enforced layout. It seems like it wants to be a verbose LISP without all the parenthesis, but instead turned into a straightjacket.
When I've used Perl, I've felt that I'm in a maze of twisting passages, each of them the same (or *mostly* the same). But it's a better fe