Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
I don't think it's right to call a language OO if it supports
inheritance, abstraction, polymorphism and encapsulation. You
should judge how easy it is, and how easy it is to do it right.
You can do all four in C and Pascal, but most people will agree those languages shouldn't be labelled OO. In Perl, it's easy to make something that smells like OO. It's easy to make something that has a variable left of an arrow and a method to the right the arrow. But that doesn't mean you have done it right. You can do inheritance, abstraction, polymorphism and encapsulation right in Perl. But it's surprisingly hard in Perl to do all four right at the same time. You have to do most of it yourself - the language isn't helping you much. In fact, it tends to work against you. You won't find the right way in the documentation, that just shows you the quick and dirty (wrong) way. It's every (wo)man for him/herself, making it hard to use or understand someone elses code. If all you care about is writing quick glueing scripts, this OO mockup works handy-dandy. Just as GURU_01 says. But to do it right, Perl is just one small step above C. I won't call Perl OO for the same reason I won't call Perl a functional programming language. Not because it's impossible to do, but because the language doesn't give you enough tools to make it easy. Abigail In reply to Re: Perl - Is it an OO Language
by Abigail-II
|
|