[aklug] Re: Perl 5 OOP

From: Joshua J. Kugler <joshua@eeinternet.com>
Date: Wed Jan 06 2010 - 15:34:49 AKST

On Wednesday 06 January 2010, Christopher Howard elucidated thus:
> Perl 5 OOP sucks. Even with Moose.
>
> I guess I've been pampered lately, working mostly with C++ and Java.
> Actually, Java has pretty cool feature which I just found out about
> recently (being a Java n00b) called interfaces, where you can
> actually define an interface (a sort of completely abstract class)
> and just attach it to any class you want, independent of the
> inheritance hierarchy.
>
> Anyway, right now I'm working with Perl because of a cool Perl
> module, but I have to switch my code over to OOP, and even the Moose
> interface seems awkward.
>
> I guess Perl 6 is supposed to improve that, but as Perl 6 doesn't
> even seem to be in the Gentoo repositories yet, I'm probably not
> going to play around with it.

Back when I programmed in Perl, I avoided classes and OOP because they
were so painful. Then I started using a language where
classes/objects/OOP was there from the beginning (Python) and it was a
beautiful, wonderful experience. In my first month or two with Python,
I had written more classes than I had in my entire previous 8+ with
Perl. I've never used Moose, so can't comment there, but I know that
OOP in Perl is often referred to as a "bolt-on" vs. the "built in" that
you'll see in Python, Java, etc.

j

-- 
Joshua Kugler
Part-Time System Admin/Programmer
http://www.eeinternet.com
PGP Key: http://pgp.mit.edu/  ID 0x14EA086E
---------
To unsubscribe, send email to <aklug-request@aklug.org>
with 'unsubscribe' in the message body.
Received on Wed Jan 6 15:35:25 2010

This archive was generated by hypermail 2.1.8 : Wed Jan 06 2010 - 15:35:25 AKST