Re: Perl Examples
> My experience with perl is that people
> are tired of new releases breaking their
There are a few other issues with Perl besides that:
Whenever you start with a simple language and then
add a bunch of features not planned for at the begining
you end up with corner cases and gotchas.
I once wasted a log of time tracking a bug from a
customer script. Due to reference, a destructor for an
object was being called twice. Once by the user on the alias, and once by perl itself when the object got out of scope. That second call messed the Perl interpreter internal data structures and the script crashed much
later. (But since I built the Perl interpreter all the fingers
pointed to me :-)
You can argue that the programmer didn't know what he was doing, but I would argue that a languages that
do garbage collection for you but forces you to
understand how the underlying data structures work is
In that respect, Ruby is a much safer language and much
easier to learn: Everything is a reference to an object. Done.
I put Perl in the same basket as C++: A language that
has a lot of good features, but which also has too many
warts added to its core. Too many little things get
in the way. You have to watch context when using
things like arrays. You have to know that something is a hash, something is an array, something is a scalar...
Too many little rules.
In that respect, Ruby is much more elegant and simple to
learn, at least if you've done a lot of OO programming.
It's like Smalltalk without the weird environment.
Much better for rapid prototypes than something more rigid
like C++: You don't even have to stub a function. You
just call it, and if the object doesn't support it you get