[Python-il] [hackers-il] Re: [Israel.pm] Perl Vs. Python on Various Points

Gabor Szabo szabgab at gmail.com
Tue Jul 14 17:36:49 IDT 2009


Hi Beni,

On Mon, Jul 13, 2009 at 10:32 PM, Beni Cherniavsky<cben at users.sf.net> wrote:

> I do want to address that meme productively.
> If you catch me degenerating to a troll, feel free to apply sunlight
> and I'll to freeze to stone ;-)
>
>
> First, it's important to clarify that Python fans don't pull the
> readability meme to be nasty (at least not initially).
> For us, it is honestly the most important thing we can say about Perl
> vs. Python.
> You could show us a 100 perl features, and we'd still say "but Python
> looks better"!
> We feel the difference is very real, and very important.
>
> You know Perl & Python and prefer Perl, so obvisouly it's not a
> universal assement.

There is a difference when you say:

"For me Python is more readable than Perl"
"Python is more readable than Perl"
"Perl is NOT readable" or "Perl is write only".

The first one is ok.
The second one is already crossing the line.
The third one is outright nasty. Don't even try to convince me otherwise.

Oh and when you try to say in all kinds of words like
"For us readability is important" is just plain sounds as FUD.
I could keep saying "For us working code is important" or I could
say "For us freedom is important".


> This might be a bit like Lisp parens - some people love them, some hate them.
> Lispers fought the "Lisp is unreadable, it all looks the same" meme for decades.
> But there is an undeniable reality to the problem: it scares a lot of people.

Yeah, the unknown scares a lot of people.


> The second observation I have to make concerns the "semantic gap".
> It's a notion I saw once in someone's defense of some esoteric
> language, can't find it now.
> "Semantic gap" is the distance between how you think about the
> problem, and how your code looks.
> Obvisously the smaller this gap is, the better - any distance adds
> friction, distraction and bugs.
>
> It seems to me that many of the intricacies of Perl's syntax increase
> the semantic gap.
> (Please read mitigating comments below before replying point-by-point.)

I don't feel myself competent to answer point-by-point nor do I think it is
relevant. There are cases where I agree that Perl isn't intuitive enough
but there are a lot of other cases where I think the same arguments could be
used just in the opposite direction.

I think it boils down a lot to how your brain works but more importantly
to what you are used to.


> [BTW, Perl 6 is much better!  It fixes all problems that were rooted
> in historical accident rather than deliberate choice.
> Eventually I gave up on it, but for lesser reasons...]

It is hard to keep up with the development of Perl 6 but we are getting closer.
I am giving a training class next month in Lisbon and I believe in a year or two
we will see it getting in production. You can already write applications in it.


> On this point,  http://greenokapi.net/talks/ReadablePerl.pdf is a great read.
> Shows perl is not bad either.

Indeed. One of the biggest problems of Perl is that it was (and still
is) used by
many  people who don't know how to write code. They were copy pasting
bad code examples or code examples that are are only working to keep backword
compability for the last 22 years. Companies are hiring people with very little
experience and telling them to write production code without even the
involvement
of one experienced Perl programmer.

IMHO it happens a lot less in Python.


regards
  Gabor

-- 
Gabor Szabo                     http://szabgab.com/blog.html
Test Automation Tips        http://szabgab.com/test_automation_tips.html
Perl 6 Tricks and Treats  http://szabgab.com/perl6_tricks_and_treats.html


More information about the Python-il mailing list