in reply to
Re: Re:: Adam:: Re:: OO-style question
in thread OO-style question
Its not a question of "does it work, can we do it?" Thats a given,
I wouldn't be hanging around this site if I didn't think
that Perl works and that it can an amazing amount of stuff
(almost anything, really...)
The question is, "Should we use it for this?" and,
in my opinion, there are places where the answer is "No."
That has been my opinion for some time now, and it hasn't
changed. I think that large scale OO projects are
a perfect example of where Perl just doesn't cut it. OO methods
need to be short and simple while garaunteeing correctness.
They need to be able to throw named exceptions which the caller
can choose to catch or not. die is the closest thing to
an exception in Perl, and eval is a long way from a
try block. Worse, perl's sub routine simplicity
of having subroutines take a variable number of arguments
and always return some value make for a large amount of additional
code involved in checking arguments
and returning undef when
you want a void method.
Large projects involve multiple
programmers from various backgrounds and skill levels. You
have to write the code so that the least experienced programmer
can work on it with-out breaking everything. And lets face it,
Perl just doesn't provide that level of support. Is that a bad
thing? NO. That's what makes Perl so much fun - its flexability.
But that's also what makes it innappropriate in a large scale
project. Sure, an extensive set of coding standards and a
crack team of programmers could do it, but eventually some
fresh out of highschool skill-less kid is going to have to
add a minor feature, and the whole thing will come crashing down.
That's why people like C++ and Java and those other languages,
they make for maintainable code.