[Discuss] Interpreters vs Compilers
Darren Duncan
darren at DarrenDuncan.net
Thu Mar 13 21:00:02 PDT 2008
At 8:31 PM -0700 3/13/08, Deryk Barker wrote:
>I'll grant you superiority in handling regular expressions, but I
>would suggest that for anything over 50-100 lines perl becomes
>unwieldy - and rapidly unreadable.
I would suggest that this is way off base.
The readability or non-readability of code is mainly due to the
programmer, not the language. Sure, some languages are exceptions to
this, meaning it simply isn't possible to make easily maintainable
code in it, but Perl is not one of those.
I for one have written Perl programs tens of thousands of lines long
and they are still easy to understand and maintain even after I
haven't looked at them for years; easy for both myself and for other
people.
Of course, I optimize for maintainability no matter what language I program in.
But the fact I am doing it in Perl with little hassle, and likewise
are many other people, speaks to contradict what you said about Perl
being unuseable for non-trivial programs.
Sure, one of Perl's touted features is providing multiple ways to do
the same thing, but so do many other languages, and there are such
things as best practices.
I recommend that any programmer shop have a copy of Damian Conway's
"Perl Best Practices" on their bookshelf. While some items are Perl
specific, many are validly applicable to any programming language.
Rule number one, when you write code, understand how it works and why
it works, and make choices for how to do something on purpose; cargo
cults are bad; understand what you are doing.
-- Darren Duncan
More information about the Discuss
mailing list