Re: perl

[prev] [thread] [next] [lurker] [Date index for 2006/12/26]

From: Yoz Grahame
Subject: Re: perl
Date: 09:09 on 26 Dec 2006
On 12/22/06, Earle Martin <hates-software@xxxxxxxx.xxx> wrote:
>
> Just as hateful, or even more so, is something like this, which
> generally indicates the author hasn't read any books about Perl that
> were published since 1998, or learnt Perl from a shoddy website, last
> updated around 2001, whose author hasn't read any books about Perl
> that were published since 1998.

Funny you should mention, 'cos one of the last Perl books I read was
Christiansen's "Perl Cookbook", which came out in 1998. It was meant
to make me feel much more confident about my coding (after five solid
years of Perl) and instead it scared the shit out of me because it was
jam-packed with samples where a slight, unintuitive change in the way
you call something will produce a completely different result. For
example, two near-identical lines of code which, to the eye of an
intermediate Perl coder, look like they do exactly the same thing.

One of the things I've always really liked about Perl (and I still do)
is Wall's efforts to bring the friendliness, fluidity and flexibilty
of natural language to a programming language. I know lots of people
hate post-statement ifs and unlesses, but I think they're great.
Unfortunately, because it's a *really* leaky abstraction, it means
that you don't get the resilience of meaning that natural language
has. Perl will let you accidentally do things that are the complete
opposite of what you meant. The compiler will often bend over
backwards to allow certain things that it should just stop (and no, -w
won't catch them all).

Yes, many languages will let you shoot yourself in the foot in all
kinds of ways, but Perl seems to be *way* better at it than most. This
is why a fair degree of effort has gone into creating modules that
discourage the wilder kinds of coding, make Perl into a less flexible
language.

The many slightly-different invocations, the module-driven Perl
variations and basically all the TMTOWTDI-ness is great for
flexibility but it is also deeply, deeply hateful. Firstly, for what
it does to both The Principle Of Least Surprise; secondly, for the
amount of brain-space I need to allocate to being able to handle all
the different ways I will encounter of doing the same fucking thing.

To me, the final nail in TMTOWTDI's coffin was Ruby on Rails vs
Catalyst. In providing loads of different possible arrangements of
template engine and all that other stuff, it both multiplied the
amount of decision making you need to do to get something basic done,
increased unnecessary complexity and as a result managed to
significantly reduce the chance of getting help on whatever specific
problems you hit during your project. RoR, for all its many faults,
provides a single path to project building that greatly simplifies
things. This is why several of the remaining Perl hackers who I
converse with regularly are moving over to RoR or Django.

Ultimately, flexibility can be a lifesaver but only at the point when
you need it. Before then, it's a burden. This problem is one of the
biggest sources of FOSS-related hate, coming from geeks who think that
"more choice" always
equals "better". To quote Edina from Ab Fab: "I don't want more
choice! I just want nicer things!"

I still think Perl's great - I've been coding in it for over 10 years.
But for future web projects, I'll probably be checking out something
else.

As for language hate: how come nobody's mentioned PHP yet? Because,
fucking hell, do I have some SERIOUS bile worked up there...

-- Yoz
There's stuff above here

Generated at 14:01 on 28 Dec 2006 by mariachi 0.52