[13116] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 526 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Aug 14 14:17:23 1999

Date: Sat, 14 Aug 1999 11:10:09 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Sat, 14 Aug 1999     Volume: 9 Number: 526

Today's topics:
    Re: Why use Perl when we've got Python?! (John Stevens)
    Re: Why use Perl when we've got Python?! (John Stevens)
    Re: Why use Perl when we've got Python?! (John Stevens)
    Re: Why use Perl when we've got Python?! (John Stevens)
    Re: Why use Perl when we've got Python?! <aperrin@mcmahon.qal.berkeley.edu>
    Re: Why use Perl when we've got Python?! (John Stevens)
    Re: Why use Perl when we've got Python?! (John Stevens)
    Re: Why use Perl when we've got Python?! (John Stevens)
    Re: Why use Perl when we've got Python?! <dgris@moiraine.dimensional.com>
    Re: Why use Python when we've got Perl? thehaas@my-deja.com
        Digest Administrivia (Last modified: 1 Jul 99) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: Sat, 14 Aug 1999 16:31:07 GMT
From: jstevens@bamboo.verinet.com (John Stevens)
Subject: Re: Why use Perl when we've got Python?!
Message-Id: <slrn7rb6eb.gr0.jstevens@bamboo.verinet.com>

On 14 Aug 1999 02:55:57 GMT, Sam Holden <sholden@pgrad.cs.usyd.edu.au> wrote:
>On Sat, 14 Aug 1999 02:36:26 GMT,
>    John Stevens <jstevens@bamboo.verinet.com> wrote:
>>On 13 Aug 1999 17:14:54 -0700, Tom Christiansen <tchrist@mox.perl.com> wrote:
>>
>>Perl requires:
>>
>>%hash = { "a" : 0 };
>
>If you like code that doesn't parse. In one line of code you show why
>you don't like perl. You don't know the basics of the syntax. Assuming
>you meant => or , and not : (python/perl interference is perfectly 
>understandable).

Actually, the fact that I make such mistakes is part of my point:

I used Perl almost exclusively for a long time.  I left it for a
short time, come back to it and . . .

Do you see my point?  I know that you would prefer to believe tha
I have never used Perl, or that I am in some way unusual.  But the
fact that I can forget, and make such syntactical blunders after
only six months away from Perl is exactly one of the things I
am commenting on.

>if you knew perl

Oh, I know Perl.  It's the syntax
that I've managed to forget, and in a very short time.

I know you don't want to believe this, but that is also true of
others.  And even the Perl coders around me have to make regular
reference to "Quick Reference Cards".

>you would see %hash = { ... as being obviously wrong. {...}

The fact that you can use the word "obviously" indicates a blind
spot.  I've gone back to Pascal programs after not having used
Pascal in over a decade, and had no problems at all in understanding
the code.

I sucessfully analyzed an Ada program after less than a week
of reading the Ada manual, part time.

And I can still read Ada, even though the last time I used it
was summer, last year.

On the other hand, even with the greatest care and attention to
good programming practices, I've gone back to Perl scripts I
wrote at the begining of the year, and had to dig out the book
to puzzle through 'em. . .

>creates a reference to a hash. A reference is a scalar, you can't go and
>assign it to a hash.

Thank you.  Do you see my point, though?  This is the second time
I've taken a Perl-hiatus, and as you have pointed out, I no longer
know Perl syntax.  Which means that I will, if I choose to continue
using Perl, have to learn the language for the third time.

That is not cost effective.

>The fact that perl uses those $,@,% symbols instantly indicates an
>error, and also indicates what the author meant and how to fix it.

True, if you use Perl constantly, have studied for a very long
period of time, and the author uses some kind of white space and
indentation style that is indicative of program structure.

>>in one spot, while in another:
>>
>>%hash = { "a" => [ "silly", "stuff" ] };
>
>Again should be $ or should use (). Learn some perl before ranting and
>raving about problems with the syntax of perl.

Excuse, but I've been polite and reasonable.  I've neither ranted,
nor raved.  Your over reaction is probably due to other people who
*HAVE* ranted and raved.

Question: have you ever considered that the fact that a fair number
of people do rant and rave, is meaningful?  Have you ever said
to yourself: "Maybe I should re-examine my assumptions?"

>This is the same as the thing above. In the first one the value is a 0,
>in the second it is a reference to a list. Where is the inconsistancy?

Had I got it right, the issue would not have been inconsistency, so
much as complexity.

>True enough, and I'm sure TomC wishes that all of the posters on 
>c.l.perl.m who refuse to learn and just ask FAQs ten times a day would
>quit perl and move onto python.
>
>Perl is not a suitable language for idiots and those who aren't prepared
>to learn.

And yet, TC claims that Perl is proudly pedestrian, that it does not
require a CS degree to use, and that even stupid people can use it.

Have you ever considered that it isn't cost effective to spend
three months learning something that you could have learned in
a week?

Using the statement, "not willing to learn", can all to easily
become an excuse.

>Maybe python is, if so good on python, but that doesn't
>reflect badly on perl.

What Python provides is not a language that idiots can use, but
instead, it provides (among other things), more context.

list.append( x ) is something that you can remember and understand
even after years of being away, while ^$a.+ ((x[]) is not.  (No,
that isn't Perl.  It's Kiss++.  But according to you Perl'ers, that
statement ought to be "obvious"! ;-> )

If Perl used, say:

hash.varName

or

hash:varName

or

hash&varName

instead of only a ASCII punctuation character, it would be less
difficult to learn, easier to remember, and less confusing.  In
other words, it would be more cost effective.

If Perl used:

class

or

object

as a key word instead of

package

it would be less confusing.

>If python wants the idiots then please find a way
>to take them. I'll start recommending them from this day on.

Feel free.  I suspect that some of those people aren't idiots
at all, they just have problem remembering that @$ means
"a reference to an array".

John S.


------------------------------

Date: Sat, 14 Aug 1999 16:43:33 GMT
From: jstevens@bamboo.verinet.com (John Stevens)
Subject: Re: Why use Perl when we've got Python?!
Message-Id: <slrn7rb75k.gr0.jstevens@bamboo.verinet.com>

On 13 Aug 1999 14:15:05 -0700, Tom Christiansen <tchrist@mox.perl.com> wrote:
>     [courtesy cc of this posting mailed to cited author]
>
>In comp.lang.perl.misc, 
>    "John W. Stevens" <jstevens@basho.fc.hp.com> writes:
>:And cost a lot, big time, in the real world also.  The most common
>:lament from a section manager: "I've got all this Perl code that
>:<fill-in-a-name> wrote, and nobody else can understand this stuff!"
>
>I am sick and tired of the implication that because stupid people write
>stupid Perl, that Perl is stupid.

I was not
implying that.

So, to avoid confusion, I'll be explicit.  The lament was not from
a manager complaining about a stupid programmer.

>Stupid people are associated with
>everything!

Yes.  True.

>Perl is also 100x more popular than Python -- simple because
>even stupid people *are able* to use it!

I don't necesarily agree or disagree that Perl is 100 times more
popular than Python.  I don't have figures I can trust.

But I question your assertion that Perl is popular because stupid
people can use it.

Perl is probably popular because:

1) People think CGI means Perl, even though CGI can be done
   in any language.
2) Perl was released before Python.
3) Perl is less of a change, if you are coming from C/Shell/Unix,
   than Python is.

>And they do.  And this is what
>we get for making something that even stupid people can use.  I hope that
>Python should be someday cursed with one tenth the number of stupid people
>who now write Perl.  Then your newsgroup can be as messy as this one.

What makes you think that the people who use Python are that different
from the people that use Perl?  Maybe "stupid", simply means, "prefers
not to use a dollar sign to indicate a scalar type"?

And the person you are implying is stupid (the one
with,
the unhappy manager is in actuality a brilliant
programmer.

John S.


------------------------------

Date: Sat, 14 Aug 1999 16:58:33 GMT
From: jstevens@bamboo.verinet.com (John Stevens)
Subject: Re: Why use Perl when we've got Python?!
Message-Id: <slrn7rb81o.gr0.jstevens@bamboo.verinet.com>

On 13 Aug 1999 14:22:08 -0700, Tom Christiansen <tchrist@mox.perl.com> wrote:
>     [courtesy cc of this posting mailed to cited author]
>
>In comp.lang.perl.misc, 
>    "John W. Stevens" <jstevens@basho.fc.hp.com> writes:
>:But in a test where programmers are ignorant of each, Python is
>:the prefered choice . . . *EXCEPT* where the programmers were
>:experienced C programmers.
>
>Well what else are you going to get?  BASIC programmers?  Now those
>are clever folks for you!  Of course most programmers are C (or C++)
>programmers.

You forgot the smiley.

>It's the only real-world langauge that gets the jobs
>done in millions of environments.

Ok, maybe you just forgot about little, inconsequential languages
like Fortran, Cobol, Pascal, Ada. . .

>Every CompSci student should be
>proficient at C/C++.  Anything else is fluff.  Beneficial, but fluff.

Fluff?

Should be?

>I don't care whether they're proficient at six other languages, and
>in fact, I hope they know those six others, but C/C++ is what counts.

Why?  Why C++ and C?

>What kind of "programmers" are you talking about?

Real programmers, doing real work.

>I think your newsreader is buggy.  Better fix it.

Nope.  The news reader is fine.  You need to check your news
server.

John S.


------------------------------

Date: Sat, 14 Aug 1999 16:59:28 GMT
From: jstevens@bamboo.verinet.com (John Stevens)
Subject: Re: Why use Perl when we've got Python?!
Message-Id: <slrn7rb83g.gr0.jstevens@bamboo.verinet.com>

On 13 Aug 1999 14:22:55 -0700, Tom Christiansen <tchrist@mox.perl.com> wrote:
>     [courtesy cc of this posting mailed to cited author]
>
>In comp.lang.perl.misc, 
>    "John W. Stevens" <jstevens@basho.fc.hp.com> writes:
>:What you seem to be complaining about is called "polymorphism"
>:in the OO world.
>
>Perl is not about shoving an OO agenda down someone's throat.

Nor is Python.  You can use Python as a totally procedural language,
if you wish.

John S.


------------------------------

Date: Sat, 14 Aug 1999 09:55:00 -0700
From: Andrew J Perrin <aperrin@mcmahon.qal.berkeley.edu>
Subject: Re: Why use Perl when we've got Python?!
Message-Id: <37B59F64.CFC967B1@mcmahon.qal.berkeley.edu>

While I sympathize with Mr. Stevens' problems returning to perl, I must
say I don't share them.  I have no computer science background (well,
okay, one course in high school), and managed to learn perl 'well
enough' for some work I had to do in about 3 days.  I did the work, then
had to go off and do some Access/Visual Basic work (*shudder!*). 
Returned to perl 6 months later, and essentially picked up where I'd
left off.  To summarize:

- No computer science background although I commonly use references,
references to hashes, and other constructs deemed complicated by Mr.
Stevens;

- Learned perl in a relatively short period of time;

- Left perl for a while and managed to return without forgetting too
much of it.

-- 
-------------------------------------------------------------
Andrew Perrin - NT/Unix/Access Consulting -
aperrin@mcmahon.qal.berkeley.edu  
            I'M LOOKING FOR ANOTHER EXPERIENCED ACCESS
               DEVELOPER - CONTACT ME IF INTERESTED.
        http://www.geocities.com/SiliconValley/Grid/7544/
-------------------------------------------------------------


------------------------------

Date: Sat, 14 Aug 1999 17:07:32 GMT
From: jstevens@bamboo.verinet.com (John Stevens)
Subject: Re: Why use Perl when we've got Python?!
Message-Id: <slrn7rb8ik.gr0.jstevens@bamboo.verinet.com>

On 13 Aug 1999 14:26:17 -0700, Tom Christiansen <tchrist@mox.perl.com> wrote:
>     [courtesy cc of this posting mailed to cited author]
>
>In comp.lang.perl.misc, 
>    "John W. Stevens" <jstevens@basho.fc.hp.com> writes:
>:Due to this feature alone, Python programs are easier to read by
>:non-authors than Perl programs are.
>
>Prove that.  Stop asserting it.  Prove it.

No matter what I post, you will not accept it as proof.  If you
really are interested in proof, perform your own investigation.

Of course, if I am wrong, simply tell me what you will accept as
proof.

>Here's your challenge.  Pick a Perl programmer with experience equivalent
>to mine,

Now, just how many Perl programmers have your level of experience?

How much does it cost to become as good as you?

Can these people do other things, and still stay good at Perl?

>I say this for certain because I *do* read their code, and it's completely
>easy to do so.

Yes?  There is a sig:

#!/usr/bin/perl -- Russ Allbery, Just Another Perl Hacker
$^=q;@!>~|{>krw>yn{u<$$<[~||<Juukn{=,<S~|}<Jwx}qn{<Yn{u<Qjltn{ > 0gFzD gD,
 00Fz, 0,,( 0hF 0g)F/=, 0> "L$/GEIFewe{,$/ 0C$~> "@=,m,|,(e 0.), 01,pnn,y{
rw} >;,$0=q,$,,($_=$^)=~y,$/ C-~><@=\n\r,-~$:-u/ #y,d,s,(\$.),$1,gee,print

So, tell me, in thirty seconds or less, and without refering to a
reference manual, what this does?  If you
wrote this, or have ever seen it before, this test is invalid.

You, of course, may well complain that this test is invalid or
unfair because *YOU* would never write code like this.  But if
you have problems with this, then why allow it?  If you have
problems with this, everybody else will, too.

>If you're talking about someone who can't stop treating Perl like
>BASIC or FORTRAN, and just doesn't `get' it, then sure, it's unnatural.
>But that's hardly my fault that they don't know Perl, now is it?

It is indeed partially the fault of the author, if a programming
language does not enforce at least a minimal set of good programming
practices.

John S.


------------------------------

Date: Sat, 14 Aug 1999 17:08:37 GMT
From: jstevens@bamboo.verinet.com (John Stevens)
Subject: Re: Why use Perl when we've got Python?!
Message-Id: <slrn7rb8kl.gr0.jstevens@bamboo.verinet.com>

On 13 Aug 1999 14:28:07 -0700, Tom Christiansen <tchrist@mox.perl.com> wrote:
>What's a "scripting" language, for goodness sake?

Read Ousterhout's paper.  The boundaries, I admit, are not black and white.
more like
gray.  But it makes a good starting point.

John S.


------------------------------

Date: Sat, 14 Aug 1999 17:20:36 GMT
From: jstevens@bamboo.verinet.com (John Stevens)
Subject: Re: Why use Perl when we've got Python?!
Message-Id: <slrn7rb9b3.gr0.jstevens@bamboo.verinet.com>

On Fri, 13 Aug 1999 15:46:44 -0400, Ala Qumsieh <aqumsieh@matrox.com> wrote:
>Ian Clarke <I.Clarke@NOSPAM.strs.co.uk> writes:
>
>Ok. So you say you have tried to learn both languages, at the same
>time, and ended up prefering Python over Perl.
>
>That's good. You seem to have made up your mind. Why do you need
>someone else to convince you otherwise?

He is looking to see if Perl has functionality that makes it worth
while to spend the extra time and effort required to learn Perl.

IOW, if you could say: Perl does this, and Python can't, and Ian
were to find that particular bit of functionality worth the cost
of learning Perl, he might choose to learn Perl.

>Different people have
>different tastes, even when it comes to your programming language of
>choice.

If the only difference between Perl and Python is style, not
functionality, then you've answered his question: there is no
need for him to learn Perl.

>Maybe 1, maybe none, maybe many. How would knowing this number help
>you?

Quite a bit.  If a large number have learned Python first, then
migrated to Perl, maybe that is because Perl has a generally
useful function that Python does not.

>If your goal was to learn Perl, then you took a wrong direction.

The first step, is to find out what something costs.  Before
learning Perl, it makes sense to find out whether the cost of
learning it will be worth the result.

>I don't think Perl has anything significant to offer over Python when
>it comes to functionality. The inverse is also true. Except maybe for
>regular expressions.

Python and Perl's RE's are now identical.

>But, IMO, Perl gives you the freedom to code the way you like. Python,
>OTOH, restricts you. A lot of people like Python because it restricts
>you and gives you only one way to do things. I think, the reason is
>that they are afraid of making choices.

No.  It is because spending the time to figure out that somebody
said the same thing, only in a different way, is a waste of time
and money.

>"Should I use this idiom? or
>that one? or maybe this one? I don't know! Let me post to usenet and
>see what the experts do." It also makes maintaining programs easier
>(especially for beginners -- not so much for experts).

Easier for both, actually.

>Perl on the other hand gives you more flexibility.

Which gets you. . . what?  Flexibility implies functionality that
Perl has that Python doesn't.  So, what is this functionality
that Perl posesses, that Python doesn't, that you describe as
flexibility?

>If the brain were limited to doing good things only, our ability to
>apply it to different domains will be greatly limited as well. If the
>brain gave us one way to travel (crawl), or one language to speak
>(probably an ancestor of hebrew), or one choice of food (dunno,
>milk?!), or the chance to do good only, then its application space
>will be a fraction of what it is now. Great inventions could be used
>for both good and evil. That's the price you pay.

So, again, the question is: if Python only allows you to crawl, what
particular functionality of Perl equates to "walking"?

>Perl is like the human brain. It sets you free.

A computer language can set you free?  ;->

Interesting. . .

John S.


------------------------------

Date: 14 Aug 1999 11:49:27 -0600
From: Daniel Grisinger <dgris@moiraine.dimensional.com>
Subject: Re: Why use Perl when we've got Python?!
Message-Id: <m3672i8d7c.fsf@moiraine.dimensional.com>

jstevens@bamboo.verinet.com (John Stevens) writes:

> The human animal has wired in perceptual preferences.

I don't believe this.  Could you provide a reference to research
that backs this claim.  It won't be valid, though, unless it compares
persons of different education levels, speaking different languages
in different cultures.  

For example, a paper demonstrating the similarities in the perceptual
preferences of MIT graduate students and those of fundamentalist
Islamic women in Afghanistan would be sufficient.

dgris
-- 
EVERYONE! PLEASE! Cite your sources!
Stop the spread of Fear, Uncertainty, and Doubt!
                  Dan Connolly


------------------------------

Date: Sat, 14 Aug 1999 17:39:51 GMT
From: thehaas@my-deja.com
Subject: Re: Why use Python when we've got Perl?
Message-Id: <7p49l5$uv7$1@nnrp1.deja.com>

In article <37b4ba01@cs.colorado.edu>,
  Tom Christiansen <tchrist@mox.perl.com> wrote:
> Unbelievably stupid subject, eh?  I certainly thought so when it was
> shoved at us.  The flame war begun in comp.lang.perl.misc isn't doing
> anyone any good, and then coming over to comp.lang.python to stir up
the
> shock troops to send in a few commandos is even worse.  I don't think
> you'd like it if we in comp.lang.perl.misc sent 100,000 script kiddies
> over to comp.lang.python to rant at you guys about how K31L they
though
> Perl was and how L@M3 they thought Python was.
>

I've been reading that flame war but I noticed that it is the Perl
people, for the most part, that have donned the asbestos undies and
charged up their flame throwers (this isn't without exception, of
course).  The Python people have remained relitively calm (the original
post was cross-posted, remember?).

Although Perl and Python, as languages, are very similar, the culture
that surrounds the two languages are quite different.  I know when I've
asked someone for help in either Python or Perl, the Python people are
definitely the most helpful.  I think I can safely say, that the Perl
community is quite arrogant, especially to people new to it.  In Python,
I haven't found that to be the case at all - in fact, quite the
opposite.  They are very helpful in helping out and leading people in
the right direction.  For example: I emailed an another of one Perl
module for help in something and his reply was, "Maybe you should learn
Perl better", nevermind the fact that what I was trying to do was
undocumented.  For help with a Python module, the author told me, "The
problem here is that you are new to Python and my documentation sucks,
so here is how you do it . . ."  The funny part was, *his* documentation
was better then the Perl documentation for the module discussed above.

And, yes, I do program in both, though most often I choose Perl.
However, when I look at some of my dusty Perl programs, I think "what
the f*** was I doing?" and it takes me a while to dig through it and
figure it out.  That situation is almost impossible with Python - the
way it has to be structured makes far more readable code.   In that
respect, Python is better.

Yes, Tom, "neatness" may be subjective, but in any language, my
handwriting is terrible.  I may write in English but some may say it
looks like Arabic. However there isn't a Arab or an American that can
make heads or tails of it.  Even me sometimes . . .

>
> Please and thank you.

And thank you.
>
> --tom
>
- mikeh


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.


------------------------------

Date: 1 Jul 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 1 Jul 99)
Message-Id: <null>


Administrivia:

The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc.  For subscription or unsubscription requests, send
the single line:

	subscribe perl-users
or:
	unsubscribe perl-users

to almanac@ruby.oce.orst.edu.  

To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.

The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq" from
almanac@ruby.oce.orst.edu. The real FAQ, as it appeared last in the
newsgroup, can be retrieved with the request "send perl-users FAQ" from
almanac@ruby.oce.orst.edu. Due to their sizes, neither the Meta-FAQ nor
the FAQ are included in the digest.

The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq" from
almanac@ruby.oce.orst.edu. 

For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V9 Issue 526
*************************************


home help back first fref pref prev next nref lref last post