[Novalug] Perl - PHP or religious wars?

James Ewing Cottrell 3rd JECottrell3 at Comcast.NET
Sat Mar 12 17:46:20 EST 2011


  On 3/7/2011 7:16 PM, Peter Larsen wrote:
> On Mon, 2011-03-07 at 15:40 -0800, Jason Kohles wrote:
>> On 3/7/11 4:20 PM, "Peter Larsen"<plarsen at famlarsen.homelinux.com>  wrote:
>>> While Perl has a OO aspect added to it in later
>>> versions, I've yet to really see any programs in Perl that used it for
>>> more than just a single library.
Probably because those programs are small. Still, it's useful to make 
objects even if only one class or one instance is required, just so you 
are thinking along those lines.

I recently wrote a program to print the dependency graph between the 
RPMs in a distribution. All I really had was one class, the RPM. Or 
maybe the File too...can't remember. Still, I wrote it differently than 
I would have an imperative program.

>> It would be very difficult for me to come up with an example of a Perl
>> program that *wasn't* object-oriented.  Anybody that is writing
>> non-object-oriented perl programs that are more than about 20 lines long
>> is doing something seriously wrong.  I've been writing major applications
>> in Perl for over 15 years, and it's been more than a decade since I saw
>> anyone trying to write serious applications without objects.
I'd say most SA perl scripts aren't OO, but they aren't "serious 
applications" either.
> My point was that I haven't seen coding in Perl that used OO other than
> as a library. By that I didn't mean to say that Perl isn't object
> oriented - it is. I just never found that as a focal point when I saw
> people use Perl to solve their problems.
Depends on your audience. I have even seen bigger applications, mostly 
CGI programs, that were not OO, simply because they were written by SAs 
rather than OO Developers. Some SAs even actively resist OO because it's 
New to them.
>> By the way, The first object-oriented version of Perl was released in 1994,
>> a year before either Java or PHP was invented, so knocking Perl for not
>> having objects from the beginning is kind of low.  :)
But not before Smalltalk or C++. And Perl's OO support is a bit odd. 
Larry is indeed a Genius, but I haven't decided whether he is an Evil 
one or not.
> Again - sorry if it came across as "knocking Perl". I didn't mean to do
> so at all.
Free Free to. Perl has much to answer for. It's amazing powerful and 
adaptable, but skirts the line of Heresy as far as Languange Design is 
concerned. Heck, sometime it walks right over!
> The "little" exposure I've had to perl over the last 15 or so years
> hasn't shown me code where ordinary Perl users talked about or used OO.
> The only time I really noticed it used was in larger frameworks used to
> create Joomla type servers. It seemed more intended to obfuscate than
> anything else.
Back to 'it's a weird OO'. But maybe it's just Bad Examples too.
>> Part of the problem is that Perl has been around so long that there are a
>> lot of people who have made an attempt to learn it, and so there is a LOT
>> of really lousy code out there that people find while Googling.  However,
>> there are also a LOT of people using Perl, it's far from dead and far
>> from obsolete.
I agree that it's far from dead. But it does seem to be on the wane, 
probably because Good Alternatives are now available.
> Agreed. Perl is NOT dead. And I love to still learn more about it. I've
> used it in the past for serious scripting needs where bash just will not
> do right.
Of course, you could just learn Python instead. I kept putting it off 
for 20 years, but I wish I hadn't. I kept saying that rather than learn 
Python, I'd just bang off another script in Perl.

The one major feature I like about Python over Perl is that it uses 
Exceptions rather than Error Return Codes.

And perhaps THAT is the real problem...features. I believe that Error 
Return Codes are Bad, and for me it all comes down to which languages 
support which features.

But let's face it...Perl is just Totally Insane. Use Ruby or Python instead.

And PHP is just Perl turned Inside Out, for the benefit of generating 
HTML. Altho it's nowhere near as insane.
> I would be very interested in knowing what kind of frameworks have been
> created for Perl for "Enterprise use", for persistency management,
> scalability and session sharing. I'll attend such a presentation at
> NovaLug with eager :)
I would say that Enterprise Frameworks are a Disaster, and have darn 
nearly ruined Java.

You can get things done so much faster in Ruby, for example.

JIM
>> Here are some places to start if you want to find out what is state of
>> the art in the Perl world today...
> [.. cut]
>
> Thanks for the links! I'll definitely take a closer look at them.
>
>> ---------------------------------------------------------------------------
>> -----
>>
>>
>> KiokuDB: Persistent Object Graphs for Perl
>> http://www.iinteractive.com/kiokudb/
>>
>> KiokuDB is a Moose based object oriented persistence frontend for a number
>> of
>> storage backends.
>>
>> KiokuDB focuses on predictability and transparency, providing quick, easy
>> and noninvasive persistence while minimising the undesired surprises caused
>> by naive serialization approaches.
> That sounds very interesting. Sorta like a "Hibernate for Perl" ??
>
>
>> I have considered starting up a NoVa Perl Users Group, if anybody was
>> interested
>> enough in Perl to read all the way down to here, let me know if you would
>> be
>> interested in such a thing.
> Having a programming branch of NovaLug would be very interesting indeed.
> Not sure if we need one per language or if we can consolidate interest
> across different languages in a single SIG?   Sign me up if you're
> interested in going forward.  Maybe we could simply stay 1-2 hours after
> the NovaLug meetings on Saturdays?
>
>
>
> _______________________________________________
> Novalug mailing list
> Novalug at calypso.tux.org
> http://calypso.tux.org/mailman/listinfo/novalug
>
>
>
> No virus found in this incoming message.
> Checked by AVG - www.avg.com
> Version: 9.0.872 / Virus Database: 271.1.1/3502 - Release Date: 03/12/11 02:36:00
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://calypso.tux.org/pipermail/novalug/attachments/20110312/d1bda92b/attachment.html 


More information about the Novalug mailing list