grinder writes "The Web Developer's Virtual Library has an ongoing series
concerning Perl. The 22nd(!) installement talks about the ugly
side of Perl: warts and all. The critisms are by and large
quite valid (and ones all Perl programmers should know about and understand)."
No criticism of Perl is valid (except for the thing about wantarray being misnamed ... that's the only one).
I smell the blood of a 'Web Developer'
jns on 2001-03-22T15:53:48
From the article:
Those who relish in Perl's power but are dissatisfied with its sloppiness may find alluring refuge in Python. On the other hand, those who thrive in Perl's freewheeling culture will likely find Python too stiff in the lip and perhaps a size too small.
Sloppiness !?
Re:I smell the blood of a 'Web Developer'
CatSullivan on 2001-03-22T18:35:08
Perl isn't sloppy, developers are sloppy.
There are times when a quick-and-dirty single-use script is just what the job calls for, and the freedom to code that way saves time. There are times when meaningful variable and subroutine names can save your s/@$$/behind/ when maintainance time comes along. It's up to the developer to decide which is which.
As for abuse of Perl by less-than-conscientious short-timers, (I've been bitten by that one too) well, that's what code reviews are for.
What warts?
Odud on 2001-03-23T16:17:14
At lot of the comments seem generally applicable to any language and so I don't worry about them to much. They seem to be more related to the programmer than to the language. You can (and I have done!) write bad code in anything from assembler upwards. A careless workman with a sharp chisel will always manage to cut himself.
I was more worried by the comments on CPAN/modules which seem to be pointed at what, IMHO, is one of the best features. Surely it is common practice when delivering any application, in any language to specify the versions needed and any add-ons that must be installed and I don't see that this is any different here. In fact a perl script that needs module x and version y will at least fail gracefully with a decent error message - better than some languages at least.
Web developers seem worse than many with this in that many pages are designed for IE version x with plugins y and z and tough on you if you haven't got them.
Invalid criticism
alleria on 2001-03-24T06:37:15
That line of spaghetti code with the references is pure bollocks. Everyone knows to use ->. There might be such an argument with regexps, but x kinda fixes that one too.
And the thing with $_ -- this is definitely a feature, not a wart. Possibly one of the most beautiful and clear things about Perl, this can make code much cleaner.
(Only caveat being to use local on the $_ to make sure it doesn't clobber anything else). And pray other functions you call don't clobber your $_.