Re: Comparing Regular Expression in Perl vs Python



From: "Jeff Pang" <pangj@xxxxxxxxxxxxx>
both you and Paul mentioned that perl is maybe easier to learn than python.
but from many ppl's experience (including mine), python is easier to
get begin with.

One of the advantages of python is that it can write code with good
style, everyone's code looks the same.but for perl's code style, oops
you can think of that...

You can write Perl with good style ... it's just that there are
several or even many equaly good styles. So everyone's code doesn't
look the same. While Python basically forces you to one "true" style
.... at least in some things.

Freedom is nice, but comes at a price. In this particular case you
can choose which do you like better.

Many guys learned perl and were confused for perl's context concept. I
remembered a guy asked,

@x = (1,2,3);
@y = (2,3,4);
$a = @x;
$b = @y;

surely $a == $b, but why not @x == @y ?

Sorry, I've been with Perl for so long that I can't remember not
considering the concept natural. I actually miss it in other
languages all the time.

Especially with Perl, Python and even Ruby everyone should try all of
them and choose the one that fits his/her brain. I have chosen.

Jenda
===== Jenda@xxxxxxxxxxx === http://Jenda.Krynicky.cz =====
When it comes to wine, women and song, wizards are allowed
to get drunk and croon as much as they like.
-- Terry Pratchett in Sourcery

.



Relevant Pages

  • Re: Ruby vs. PHP
    ... comparing languages within a few points of standard deviation (that is to ... benchmark-suggested 1.1% performance improvement for Perl, ... Use Ruby." ... of Perl, Python or PHP, but YARV *is* in that neighborhood. ...
    (comp.lang.ruby)
  • Re: Ruby vs. PHP
    ... done is checked out which versions of Perl, Python, YARV, Ruby, jRuby ... dynamic language to the seconds for the benchmark with gcc. ... YARV, Python, Perl and PHP have fairly close medians and the boxes are ...
    (comp.lang.ruby)
  • Re: is it possible to install a desktop-manager without python and perl?
    ... I removed the 2 packages, python and perl, from my system, ... "A similar study was later made of Debian Linux version 2.2 (also ... with people why you languages other than c/c++ ... ...
    (Debian-User)
  • Re: Python compared to other language
    ... I think that Ruby, which roughly speaking sits somewhere between Python ... and Perl, is closer to Python than Perl is. ... I'm not sure if Ruby, or PHP, are as general purpose as Perl or Python. ...
    (comp.lang.python)
  • Re: Python vs. Perl
    ... it is possible in both languages to compile a regex once and use ... but it is more plainly specified in Python. ... By default, Perl variables are global, but there is a "my" ... embeddable in VMS DCL command scripts. ...
    (comp.lang.python)