[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] Introduction



On Thu, 1 Jul 1999, Bart Lateur wrote:

> I second that. Hell, I'm a very active MacPerl user for close to 4 years
> now, and I STILL don't use the OO stuff in Perl. Actually, you don't
> don't need it. It slows down your program.
> 
No, you don't need to use OO in Perl. But there are situations where you
should. Quite possibly less often than OO is used now.

I personally would never NOT use OO where the program logic otherwise
required it just because it was slower. (Parse *that* sentence! :-))
Unless speed was a bottleneck.

> But I cannot stress this enough: modules and OO are *not* related.

Quite correct. Object classes are Perl *packages*, not Perl modules.
Though, as you point out, very often the package is also contained in a
module.

I'm personally of two minds whether someone new to OO should first learn
OO concepts using Perl5 or not. Most pure OO languages are very rigid, and
one can get the impression that OO things must be done just like so. Perl5
OO, OTOH, makes it painfully evident that there are many different ways,
as long as one recognizes that an object is data combined with methods to
operate on that data, nothing more, nothing less. But I've seen OO
newcomers get terribly confused when they compare how Perl does OO to how
other languages do it, so I'm unsure on this. :-)

Arved



===== Want to unsubscribe from this list?
===== Send mail with body "unsubscribe" to macperl-request@macperl.org