python vs perl lines of code

John Bokma john at castleamber.com
Sat May 20 00:56:33 EDT 2006


Edward Elliott <nobody at 127.0.0.1> wrote:

> John Bokma wrote:
> 
>> Edward Elliott <nobody at 127.0.0.1> wrote:
>> 
>>>>> like "from X import *" which are generally frowned on in python
>>>>> while 'use MOD qw(id)' is encouraged in perl.
>>>> 
>>>> Not by me, and I doubt it is in general.
>>> 
>>> Well it's all over the Perl Cookbook.
>> 
>> Yeah, sure, all over. 
> 
> 125 occurences in 78 recipes.  Sure looks like all over to me.


>> Maybe check the book again. It is used in some 
>> examples, sure. And it even explains how it works. 
> 
> Yep, 125 times.  In 78 recipes.  Out of 105 total recipes with 'use'. 
> I'd say a 3:1 ratio is pretty strong encouragement.
> 
>> Don't forget that most 
>> of the book was written around 1998. Yes, 8 years ago.
> 
> Doesn't matter.

Yes it matters. 8 years is a lot of time in IT. In 1998 Perl5.005 was 
announced (22 July). [1] Which should tell you a lot if you indeed have 
3 years of Perl skills.

> It's still the standard example reference.  People
> use it heavily.  They don't magically know what parts are now
> deprecated.

If they are serious with their study they know that a 8 year old book is 
hardly up to date. I tend to take most IT related books I use that are 
older then 3-4 years with quite a grain of salt. I am not going to take 
an 8 year old Java CookBook very seriously for example.

>> You can even find examples on my site that use imported functions
>> (which I will fix, because I frown upon it :-) ). But I doubt you can
>> find a majority in the perl community that *encourages* the use of
>> imported functionality.
> 
> I can readily believe that the "community" frequenting the newsgroups,
> mailing lists, and blogs don't encourage it anymore.  But that's a
> tiny fraction of all perl programmers, and most of them have no
> exposure to this little clique.

Pfft, you are just guessing around now.

> For many people, whatever the
> cookbook says goes.  If it's wrong, update it.

Well, contact the authors or O'Reilly. Seriously, are you using 8 year 
old Python recipes without thinking?


[1] http://history.perl.org/PerlTimeline.html

-- 
John                               MexIT: http://johnbokma.com/mexit/
                           personal page:       http://johnbokma.com/
        Experienced programmer available:     http://castleamber.com/
            Happy Customers: http://castleamber.com/testimonials.html



More information about the Python-list mailing list