I presume you meant to say "didn't".
Indeed. (And also, thank you for a polite and non-defensive answer.)
Perl and C are fundamentally different languages, especially for
example in their approaches to arrays (including strings).
Well, yes. And both are different to Smalltalk, Scheme, Ruby, Python,
CLOS, Haskell, Erlang, Forth, Eiffel, Ada, Java. And all of these are
somewhat different to each other.
But for everyone of these except Perl, the equivalent of the Llama
teaches you what the equivalent of a struct is...
And, come to think of it, so do the Llama's rivals.
Why should the book that is uniquely deficient be the one that is
recommened in the FAQ?
Pointers
are very much required in C to do array manipulation. In Perl
however one can quite happily expand arrays, unshift data to the
start of an array or splice material into the middle of an array
by just using built in functions without any requirement for
references or thoughts of the mechanics of memory allocation.
But you can't create the sort of meaningful, coherent, problem
illuminating data structures that even beginning programmers using
other languages take for granted if you are programming in Perl - not
unless you know what references are.
The Llama book fails it readers in this regard. Being able to build
user defined problem specific data structures is as fundamental tool of
modern programming as defining subroutines. Leaving this out is
abominable - it cheats readers, and makes Perl look like a much less
powerful language than it is.
Such array manipulation features combined with hashes obviates the
need for objects in many cases where C would require structures
and pointers.
I'm sorry - I was talking about data structures: objects are a
different thing again.
To take a trivial example... you have data in the format of a unix
password file and wish to sort, modify, or print different fields.
In C one would automatically think of using an array of structures,
each structure containing an individual entry. Pointers would be
required. In Perl, a simple array of scalars would be sufficient
without any use of references whatsoever (or, if a field such as
'username' was unique to each entry, a hash of scalars).
Yes, one can construct an arbitary trivial example for which user
defined data structures are not necessary to produce a solution. In
fact, one could always do without them - there are Olde Fortran tricks
for this - but no programmer in his right mind would use a programming
language that seeminly lacked them when he could be using Ruby or
Python instead.
I consider the Markov chain example in Kernighan and Pike to be trivial
- and that requires references to have a tolerable solution in Perl.
Thus in teaching the basics of these languages, it is horses for
courses.
Umm... you seem to be arguing that Perl should be confined to being
used for pathetic 20 toy problems like the one above, and that Llama
should reflect this? ...I thought that was PHP was for.
Seriously, the need for data structures using references appears even
in very short programs - the K&P example was only 20 lines.
If Perlers are going to recommend a book that makes it look like Perl
lacks this basic ability, then I still suggest that they at least be
polite when they guests from other language communities reach te
predictable conclusion that Perl is a toy language - and prepare
themselves for more new projects going to technologies other than Perl.