From: David Ihnen > en the newer perl modules on cpan started to use OOP, and I guess this is because OOP is better, even though under perl it usually > makes the programs run slower. > Perl's speed, even under oop, is good enough. OOP makes the libraries easier to maintain and extend. You should well be an advocate of > good-enough - thats what the php programmers are all about, right?
I know this, but the perl docs tell the truth that perl OOP is slower than functional perl and the beginners don't like to hear that using OOP under Perl make it slower. Of course that they don't benchmark to see if it is faster than PHP. The PHP docs don't tell that using the OOP style makes the programs slower. I have also heard from some programmers that they don't like to use perl, because for doing some thing they need to use eval {...} because they've read that eval makes the program slower. They don't understand that there is a difference between eval "..." and eval {...}, and even eval "..." doesn't slow so much the program anyway. > I can't believe you would say that the particular syntactical constructs used in the object oriented declaration is even slightly relevant to the > usability of the language. saying 'package' instead of 'class'? Saying 'use' instead of 'import'? I'm agog. Any language transition involves > > learning new syntactical constructs for the new environment you're in. And thats the only real difference between The Java/C# 'style' and perl, is Not the term is so important, but it shows that Perl is an archaic language that doesn't follow the standards of the new languages. Even in perl we call the classes "classes", but the new programmers won't find classes, but packages, and those classes are not extended as in other languages, using "extends", but use a totally different style. A programmer that learns many languages and can program in C/C++/Java/C#/PHP/Perl/Python/Ruby won't find that hard this different syntax, but there are very very many PHP programmers that know only PHP. That kind of programmers could find harder to learn a totally different syntax, so the target audience of perl decreases. > we cannot do everything with perl. But that is okay. What is important to remember is what we CAN do with perl. Even when > you have a high-performance graphical processor module written in C/C++/Java, the business rules, glue, and associated logic that > is not fine-grained performance critical are best implemented in a scripting language just like Perl. I've seen that most of the software companies use a single language for a single project. They use either Java or DotNet, either PHP, but not mix more languages because they would depend on programmers that know well more languages, and they are harder to find, and more expensive. Octavian