Why use Perl when we've got Python?!

John Stevens jstevens at bamboo.verinet.com
Sat Aug 14 17:10:36 CEST 1999


On 14 Aug 1999 04:08:05 GMT, Sam Holden <sholden at pgrad.cs.usyd.edu.au> wrote:
>That could simply have been a reference. Or a symbolic reference.
>
>What is fundamental is that a @ tacked on the front indicates that it is an
>array.

:-)

What is so amusing about that, is that you can say that with a straight
face!

:-)

>So given @$fred, even with no knowledge of what that exactly means
>you should be able to tell that it is somehow treating $fred as an array.

No, what any reasonable person would do would be to grab for his
Perl book. . .

>>Yes. . . is it a hash, or a scalar?  If it is a scalar, why
>>is it called dict?  If it is a hash, then why is it prefixed
>>by $?  If this is a reference instead of a scalar, then why
>>doesn't it have it's own special prefix character.  ;->
>
>It's a scalar. It is named dict because TomC called it that.

Yes.  My point exactly.

>It is
>also named that since it is a reference to a hash. I use code like this
>in C quite a bit :

A reference to a hash. . . and yet TC claims that Perl is open to
non-computer scientists.

:-)

Doesn't *ANYBODY* else see the irony in that?

>If you know what it means then why do you continually get it wrong
>throughout this thread?

I don't suppose that you realize that getting wrong simply
proves (and illustrates) my point?

I learned it.  I used it.  I haven't written a new Perl program
in three months.

I come back to it, I get it wrong. . . do you see, yet,
or do you just not get it?

>>You cannot write Perl that resemble Python.  You are required to 
>>use curly braces as block delimiters.
>
>In fact you are not. You are wrong yet again.

Actually, I'm right, and you go on to prove I'm right.

>Here is some code from Damian Conway from the 'Impythonating PERL' thread
>in march.
>
>package impythonate;
>use Text::Tabs;
>my ($active, @bracket) = (0, ('{', ';', '}') );
>sub import
>{
 ^ Look closely. . . see that curly brace?

>And here is his sample code that is now valid perl (although anyone who uses
>it for real code should be killed) :

To late.  You already used a curly brace.  Disproving your point,
in case you hadn't realized it.

John S.




More information about the Python-list mailing list