Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Perl vs. Python: Looking at the Code

by thraxil (Prior)
on Apr 03, 2002 at 17:15 UTC ( #156355=note: print w/replies, xml ) Need Help??


in reply to Perl vs. Python: Looking at the Code

i have to agree with the other posts that the terseness of some of the syntax is a pretty poor way to compare two languages.

especially when all the examples are chosen with a bias. let's look at some other aspects of the syntax:

#perl $foo .= $bar;
#python foo.append(bar);
# perl $foo =~ s/\W//g;
#python import re foo = re.sub(foo,'\W','')

my point is that with contrived examples, you can probably argue it any way you want. with perl's flexibility i've found that i can write overall shorter programs in perl than in python even if some of the individual statements are longer.

if all you care about is terse syntax, you'll love colorForth: here's an IDE driver written in one page of code.

anders pearson

Replies are listed 'Best First'.
Re: Re: Perl vs. Python: Looking at the Code
by raptor (Sexton) on Jun 29, 2002 at 15:05 UTC
    one other thing that comes in my mind AFAIK python has several RE modules (as do much of the other languages)... and guees how they call them :
    "Perl compatible regex"
    :") so if i look only one side i.e the RegEx side of view, 'cause the poster does exactly this ...
    ps. the bad thing is that from after a year or so they will say "Perl5 compatible regex", 'cause perl6-compatible-regex they will not have in the near 5years atleast :")
    A reply falls below the community's threshold of quality. You may see it by logging in.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://156355]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (2)
As of 2019-02-20 03:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I use postfix dereferencing ...









    Results (105 votes). Check out past polls.

    Notices?
    • (Sep 10, 2018 at 22:53 UTC) Welcome new users!