[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[OT] Re: svn commit: rev 7879 - trunk/doc/book/book

From: Greg Stein <gstein_at_lyra.org>
Date: 2003-12-01 11:29:14 CET

On Mon, Dec 01, 2003 at 07:25:50AM +0100, Jostein Chr. Andersen wrote:
>...
> It's probably no such thing as "Perl's recommended coding standards" but
> many Perl programmers like the old Kernighan & Ritchie style:
>
> if ($foo = 0) {
> do something unredable;
> } elsif ($foo = 1) {
> do something nastier;
> } else {
> make gstein and others port it to python;

ROFL

> }
>
> The crap above combined with the lack of not declaring variables and
> other funny stuff have made many Perl scripts very hard to maintain and
> understand.

Globals. Inconsistent patterns. Hash vs scalar vs ref vs ???. ...

> Many Perl scripts like this have made many experienced programmers to
> just turn around and "reinventing" programs. A well known example is
> ViewCVS wich was "inspired" of cvsweb - wich is probably done because
> the unclean and unmaintable (and somewhat typical) Perl code.

No probably about it :-) I wanted some extra features in cvsweb, but it
was *WAY* too painful to shoehorn the damned things in. I can edit Perl,
and do some lame-o writing of Perl scripts, but cvsweb was just *so*
horked that I actually *saved* time by taking a weekend and converting it
to Python. In the process, I threw out all but one global (which has since
been removed, too), and cleaned up a lot of the control and data flow
problems present in cvsweb.

My opinion is that Perl is great for small one-off scripts. Applications,
or scripts which deal with data structures... forget it. Perl is a bit
better than Python when acting as a "control" script, but I tend to go
"all the way back to shell script" or stick with Python rather than the
Perl midpoint for those cases.

Perl is a great language in the hands of experts. The real problem is that
there are way too many non-experts using it. Python is good in anybody's
hands, which is why I continue to recommend it.

One of the benefits of converting cvsweb [in Perl] over to ViewCVS [in
Python] is that I think it reactivated the community of web-based CVS
repository exploration. cvsweb was and is still pretty dead, while ViewCVS
has seen continued activity. Most recently, it has been managed extremely
well by two of our SVN committers: C. Mike Pilato, and Russell Yanofsky.

Well, back to your regularly scheduled programming...

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Dec 1 11:32:20 2003

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.