4 ms·
This article isn't terribly interesting, really. Yes, you can write clean, understandable code in Perl and most widely used languages. Yes, you can write awful
by bendotc 17y ago
This article isn't terribly interesting, really. Yes, you can write clean, understandable code in Perl and most widely used languages. Yes, you can write awful code in any language. The real test of messiness, ugliness, readability and comprehensibility is in the cases in the middle. How easy is it to write readable code? How hard is it to write bad code? And this one might be a little controversial, but how does the culture around the language value readable, clean code?
Put another way, when I'm actually working on a project in the language, what's the likelihood that someone who I'm working with or who worked on the project before me has really messed up the code base in ways I'm going to be dealing with for years? And how hard am I going to have to work to not be that guy?
Finally, the article uses an example of parsing LaTeX with Perl vs. Python, and uses a regular expression. Now, I don't know if LaTeX can, in general, be parsed with regular expressions, but writing a parser aside, it's no surprise that Perl wins when dealing with regular expressions. That's a fine thing, and definitely something Perl's got going for it (or possibly against it, depending on how you feel about regular expressions), but Perl just about grew out of being a regexp DSL -- it's not really a fair fight. Put a full Perl TeX parser up against one written in Prolog, and I bet Prolog would win, but it doesn't mean I'd use Prolog over Perl for most things.
- berntb 17y ago>>when I'm actually working on a project in the language, what's the likelihood that someone who I'm working with or who worked on the project before me has really messed up the code base Well, the quality of Perl code is very diverse, since a lot of system administrators are mangling the language... :-) Perl's general community seems to be very good (newbies went with PHP for quite a while). You can arguably see the CPAN as a result of that. (It is common to say -- "Perl is irrelevant, the killer app is CPAN!".) Another advantage is that Perl doesn't have so many embarrassing fanboys as certain other environments... (I believe the hype level regarding the scripting languages comes from them being so similar that they compete for the same niche.) Since Moose seems to standardize a solution to the OO syntax ugliness, the main Perl problem is IMHO the parameter passing to functions/methods. There are advantages and disadvantages to most everything. Edit: Small syntax/word choices. Removed ":-)" on comment that other environments have too many fanboys, language wars are such a time waste.