Re: Learning Perl - the Good and the Bad (Tutorials, Habits, and Tools, etc)




> > But Llama is totally unique for a major language book in that it leaves
> > out at least one key feature without which you can't understand the
> > language properly - you can't even write a decent function to take a
> > dot product.
>
> You are creating examples which back up your opinion. You are stating
> that the Llama is defficient because you can't write a subroutine to
> create a dot product with just its given knowledge.
>

It's very kind of you to say so, but, no, I didn't invent the idea of
the dot product - it was some dead guy's idea...

> Let me count how many times in eight years of Perl programming I've
> needed to write a program to compute a dot product........ Got it.
> Zero.


Paul: it wouldn't matter if you were a total innumerate and couldn't
even understand what a dot product is. The dotp, Paul, is what is
called an "example". The point, Paul, is that someone who read Schartz
and Phoenix' book:

1. Would not be able to write a function that dealt with two arrays in
a reasonable fashion, . So comparing two arrays, getting the union,
intersection, or difference of two arrays is out.

2. Would not be able to create the the sort of data structures that
programmers take for granted in other languages - because in Perl these
require refereneces.

3. Might not KNOW that he did not know these things because of his
choice of book rather than the deficencies in Perl.

4. Would not be able to return eg two arrays elegantly from a function
- something that is trivial in Python or Ruby

The dotp was just a simple illlustration of part of this problem.
Here's another good illustration: look at the Markov chain program in
Kernighan and Pike's "Practice Of Programming". K&P picked it as a
simple example suitable for evaluating a language - but would you
really want to code it without references? With C++, Ruby, Python, Lua,
Lisp, Ocaml, etc, it's a warm-up piece. But apparently with Perl it's a
magnum opus for advanced programmers...

> Should I attempt to list all the subroutines you *can* write with what
> the Llama gives you?

Yes, please do that. And pass the task on to your children. When one of
your descendents realizes that being able to write an infinite number
of functions is not the same as being able to write every useful
function, have him contact me.

Paul - when people (people who can already program!) can read a 300
page book on a language - or take one of S&P's $14,000 4 day courses -
and they come away unable to write functions that act on two arrays,
and with not even an idea how they might use the equivalent of a
struct, ***then there is something wrong with either the language or
the book.***

Unfortuntely, Llama's status as one of the two "authorized" texts for
Perl (with the Camel being MUCH thicker and less accessible) means that
people who are using it for a quick overview are getting a distorted
idea of Perl as a sort of idiot-savant language, a programming
"Rainman" good for writing throw-away text processing scripts and
nothing more.

Now, my impression of the current marketplace is that Perl is suffering
from this impression - and so are Perl programmers. But exactly the
text that a lead programmer or project manager in a hurry will pick up
to get a fast overview of Perl will leave them convinced that Perl is
problematic!

Finally and once again, the disclaimer on Llama would be totally fair
if either:

1. In general, programmers who pick up a 300 page renowned and
community recommended text on a programming language do NOT expect it
to tell them how to write functions that take two arrays, or how to
construct data structures.

2. People who read the disclaimer REALIZE that, yes, Perl does let you
write functions that take multiple arrays - but this book passes this
topic by - and, yes, Perl does let you create powerful data structures
- but this is missed out too.

Frankly, I don't think anybody reading the preface you referred to
would believe the first or realize the second.

Llama cheats a good number of its readers, turning many of the best of
them away from Perl for life - and it probably costs ordinary Perl
programmers jobs. (Would you commission a 10,000 or 100,000 line
project in a language where using the equivalent of a struct is a
advanced topic?) If it was called "Perl For Web Programmers" or
something similar I might not have a problem with the book. But it
isn't. It is called "Learning Perl", and you don't - you mis-learn it.

This problem is serious, and it is unique to Perl.

.



Relevant Pages

  • Re: Python or PHP?
    ... >> languages that took the opposite tack (i.e. - Perl and Common LISP) ... design philosphy of the language. ... I just had a glance on Python, ... Then why do most Perl programmers consider unless "! ...
    (comp.lang.python)
  • Re: Why is Perl losing ground?
    ... A language which is aiming for broader acceptance also has to be ... > only saying that these shouldn't be part of the Perl base, ... | and Pascal programmers, C programmers do not use cute names like ... guidelines should be a relatively trivial modification of those already ...
    (comp.lang.perl.misc)
  • Re: Why is Perl losing ground?
    ... A language which is aiming for broader acceptance also has to be ... > only saying that these shouldn't be part of the Perl base, ... | and Pascal programmers, C programmers do not use cute names like ... guidelines should be a relatively trivial modification of those already ...
    (comp.lang.perl.misc)
  • Re: Check POP3 E-mail
    ... you're saying that the perl interpretter doesn't just skip the ... languages which did require explicit initialization, ... Granted, wise perl programmers like ... > across from one language to another. ...
    (comp.lang.perl.misc)
  • Re: Java sucks, Perl Rules.
    ... >> I strongly suggest to the Perl community that at the very least the FAQ ... >> notes in its coverage of Llama that it *is* missing references, ... reader, and derogatory to the language, and quite possible as harmful ...
    (comp.lang.perl.misc)