[Nolug] Crappy Perl Code (was Re: Evo and Outlook)

From: Mark A. Hershberger <mah_at_everybody.org>
Date: Sat, 12 Jul 2003 23:03:33 -0500
Message-ID: <87znjjf4yy.fsf_-_@everybody.org>

Alex McKenzie <alex@boxchain.com> writes:

>> I must've missed it. Where did I advocate obfuscated, unmaintainable
>> code?
>
> By advocating the minimal LOC approach, then mentioning CPAN in the
> next sentence...Maybe I misunderstood.

Minimal LOC doesn't necessarily mean obfuscated or unmaintainable.
Lisp is probably the best language out there as far as LOC and no one
has accused it of being unmaintainable. (Yet?)

When I say minimal LOC, I'm not just talking about cramming as many
functions or operators onto as few lines as possible.

Instead, I'm talking about the capability of the language. If a
language has constructs that allow you to compactly express some
concepts, then it reduces the LOC necessary to accomplish your goal.

As I said, Lisp is the hands-down winner here. Lisp's macros reduce
line count (by increasing expressiveness per LOC) more than anything
else.

When I mentioned CPAN, I was talking about leveraging code that other
people have written -- reducing the LOC necessary to write a finished
product.

It's amusing that you thought I was saying CPAN and Perl are good
because there is so much crappy code.

> My point is that it's too easy to make a one-liner, or
> a hundred line long one-liner, in Perl, and it's considered by some to
> be a great thing. It's not, if others are expected to make sense of
> it. You get all the difficulties of assembly language, with none of
> the benefits.

And my point was that you shouldn't expect a newbie to maintain code
written by a guru, no matter what the language. Yet, this seems to
be the subtext of the argument put forth by some people who claim
that Perl encourages poorly written code.

Mark.
___________________
Nolug mailing list
nolug@nolug.org
Received on 07/12/03

This archive was generated by hypermail 2.2.0 : 12/19/08 EST