Remember that you have to substract about a yeare from the date on the
book to get back to when the writing started. At that time, Stonehenge
was just developing the materials to teach objects and references, so
we didn't have enough time to shove that into a book. Both "Learning
Perl" and "Learning Perl Objects, References, and Modules" are based on
our Perl courseware that we teach for a couple of years before we turn
it into a book, and Perl 5 was still fairly new when the writing
started.[/QUOTE]
But I understand that references (A Perl 5 feature) as well as classes
still aren't in the THIRD edition. And, of, now there's a FOURTH - and
I still can't see references or classes in the contents.
And the Perl 5 alpha in 1993 surely had references? So Schwartz et al
had four years to add a subject that could be explained in a few pages.
So frankly, your "We didn't have time" excuse seems rather thin to me.
Some people would say that "Learning Perl" aka The Llama aka Schwartz
and Phoenix is a big part of the problem Perl has. Not only doesn't it
cover objects, it skips references.
[I think I may be feeding the troll, ... ]
Then it really is stupid of you to reply, isn't it?
Otoh, smugly labelling anyone whose views you disagree with a troll is
a sign of an emotional age that it still in the lower regions of high
school anyway - so take your choice: emotionally or mentally retarded.
(And thank you for being gratuitously rude in your response - it is so
much easier making one's point against an obvious bore. And fun, too.)
We could have made on giant book, but we were worried about rotator
cuff injuries so we split it up into more than one book, each about 300
pages long.
An attempt at humour!
The progression goes from "Learning Perl", which covers the
very basics of the language so readers can write 100 line programs
(including using, but not writing, OO modules), to "Intermediate Perl"
which covers the stuff you say is missing, and then to "Mastering
Perl", which I'm working on right now. I'm sure Java programmers are
familiar with using more than one book (since I used to have quite the
stack of Java books when I was using the language regularly).
I'm sure - as I said - that Java programmers are NOT familiar with the
idea that a language construct needed to do things as simple as
- Pass two arrays to a function
- Create the equivalent of C style structs
- Return tuples containing multiple arrays, etc
should be relegated to an advanced book.* So when they read the
standard and FAQ supported introduction to Perl and they don't find
these things, they reasonably conclude that Perl is a glorified regexp
engine and not much else.
Selling an introductory language book that doesn't cover such
fundamental topics is unique - I can't think of any 300 page
programmers-only book I know that so truncates its coverage of a
language. There is no way that a reader picking up Llama could expect
the crippled coverage you provide. If you want to be fair, I suggest
adding an explicit warning along the lines of "Perl has the equivalent
of C style pointers and structs, but this book doesn't cover them". Put
this on the back cover (and see how many copies the Llama still sells.)
Until then you are letting people down - there is a reasonable
explanation of a programmers-only and FAQ-advertised text like Llama,
and you are not meeting it.
And you are giving non-Perl programmers - often senior ones, like the
guy I was responding to - a picture of Perl that means they will not
use it or hire Perl programmers.
The stuff you're looking for is currently in "Learning Perl Objects,
References, & Modules", which covers, well, just what it says it does.
Yes, I know about the Alpaca book. I also know that references are
covered in eg "Teach Yourself Perl in 24 Hours" (the book I bought for
my biochemist girlfriend) along with modules and classes, and that the
book is perfectly usable by someone who has never programmed before.
Otoh, web tutorials like Perl In 20 pages cover references (etc) quite
adequately in a brisk treatment suitable for professionals. So why the
devil should *anyone* read Llama?
I also know that I could give a junior programmer a copy of Learning
Python to skim, and the next day ask him to hack out an implementation
of the Markov chain program that Kernighan and Pike use as a short
language comparison benchmark in The Practice Of Progamming. If I gave
another guy Learning Perl, he *wouldn't* be able to do this - in fact,
he might conclude it's impossible to code a decent solution. Which
language do you think would get chosen for a project? Do you think this
could have anything to do with the fact Perl is now seen to be a
language with its market share in decline, with the boring jobs going
to PHP and Java, and the interesting ones going to Java and Python and
Ruby?
Perl is a somewhat harder language to use than Python or Ruby. Making
it seem very much less powerful too is probably a big mistake.
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, and why
this matters, and mentions that some other introductory books do cover
this material. As things stand, Llama is your ambassador to the rest of
the programmer world - including the people who give you jobs - and it
is making you look bad, and almost certainly costing you money and
jobs.
* Or an advanced language course. Let's see how much it would cost to
learn to write a function that could take two arrays as parameters
using Stonehenge training courses:
Llama course: $2000 + 4 days x $3500 => $16,000
Alpaca course: $2000 + 3 days x $3500 => $12,500
Total: $28,500.
Plus about two weeks wages, taxes and overhead for the people you send
on the course - so, reasonably, $60,000 dollars to get 10 people
trained to write a script that kid with the Python book wrote on his
second day - probably before lunch.
Otoh, most of your competitors (some of them authors of much more
impressive books than Llama, but let's not drag them in to this by
name) cover the Llama *and* Alpaca material in their introductory 4 or
5 days courses.