Sorry, but I strongly disagree. Pointers in C are memory addresses,
As are SV*s
something that otherwise you find in assembler. You can manipulate them, you
can add or subtract to the address, etc, etc.
A reference in Perl is an _abstract_, well, reference to one concrete
object.
No. That might be how you like to think of it, but that's not what it
is. It's an area of malloced memory that Perl maintains a pointer to.
That memory, in trun, can contain a pointer to another SV, and that
target SV is almost always informed of the pointer relationship in
order to allow for reference count-based garbage collection.
On an implementation level it may be implemented as a C
pointer, but it could just as well be an index into some variable list or
whatever. As a Perl programmer you don't know and you don't care.
But as a C programmer, understanding the implementation helps in the
understanding, and this need to abstract away the guts is what
typically gets people into trouble trying to understand high level
languages, when they are coming from low-level langauges.
C forces
the programmer to implement memory management manually while Perl does it
automatically. There is not new(), malloc(), or free() in Perl.
This is also not true. C gives you fewer tools, and provides fewer
implicit behaviors, but just by way of example, the way the C call
stack is managed is most certainly memory management, and if you don't
believe me, try calling alloca(3).
Perl also requires and allows you to do memory management, but it is
all done through SVs, HVs, AVs, GVs, etc. Somtimes this is quite
important. For example, you can control de-allocation of an array in
three ways, each of which has its own behavior: assign an empty list,
"undef" it, take it out of scope. How memory allocation is affected is
not only different in all three cases, but HOW it is different is
documented as part of the language.