in reply to Perl - Is it an OO Language
The various methodologies of programming are admittedly a widely unexplored field for me. From that viewpoint - experimenting, not being fixed to one or another - I'd like to point out one outrageous strength of perl: its flexibility - TMWTDI! You can use perl the way you choose or as required by the situation. You might code in linear, orthogonal or even diagonal ways. Just another quote from the Camel: "In a nutshell, Perl is designed to make the easy jobs easy, without making the hard jobs impossible."
Re: Re: Perl - Is it an OO Language
by ignatz (Vicar) on Aug 27, 2002 at 11:33 UTC
|
Ahh, flexibility: Perl's greatest strength and its greatest weakness. When it comes to OO programming, there has to be a distinction between how flexible it is to do something and how flexible it is to use.
It is very easy to do OO in many different ways in Perl. Bend over backwards and you can easily tie yourself up into a pretty OO pretzel. No two Perl gurus seem to be able to agree on what is the "best" way to do it. ("Cargo Cult! Cargo Cult!") In these terms it is "flexible."
The fact the OO implementation in Perl is so "flexible" means that the resulting classes are very inflexible in terms of reusability. They don't play well with others.
In order for a language to be "OO", there have to be a clear set of rules that all of the objects can agree upon. OO needs flexibility not in terms of how one creates objects, but in terms of how one uses objects. In these terms, Perl fails miserably.
()-()
\"/
`
| [reply] |
Re: Re: Perl - Is it an OO Language
by stefp (Vicar) on Aug 27, 2002 at 19:33 UTC
|
Sometimes, someone wants to trade flexibility for performance. I would like in perl6 to have a pragmatic
mode that indicates that I forsake classes as objects
and dynamic inheritance graphs so as to be able to
beneficiate of a faster run-time. It would force
me to declare the type of every variable.
My dream is to be able to compile such a code to
native object code.
A program would start its life very flexible and eventually would be optimized so as to be compilable.
So the TMOWTDI would not apply only to many possible
programming style but would also mean that the style of
a program will change over its life.
--
stefp -- check out TeXmacs
wiki | [reply] |
|