Python only has semantic initial whitespace - most people find that it stops being painful after an hour or so.


Unlike Ruby (at least it did the last time I looked) it doesn't have semantic whitespace in the middle of lines...

Where does Ruby have this? Never noticed it myself (which may be more of a comment on my observational skills ;-)

Your complaint about trailing commas being context dependent is just... silly. If you've a one element tuple, most people will wrap it in brackets for clarity.

Well, not silly exactly. While much Python is laudably clear, I also find the trailing comma convention for print/tuples vexing. Most languages train you to treat trailing commas as semantically insignificant. It took a long time to persuade my eyes to notice them in Python.

No more annoying than many things in Perl though.

It also illustrates one of the major differences between Python and Perl. In Python "tuple-ness" comes from the comma operator. In Perl "list-ness" comes from the list context of the expression. If you come to one language from the other it can be confusing either way. Python folk stare at the right hand side of the expression when they should be looking at the left in Perl. Perl folk stare at the left side and wonder where their @ symbols have gone :-)

Except in a few specific cases, named functions are preferred to lambdas.

True. But is that because named functions are better, or because the implementation of lambda sucks? The expression/statement distinction that applies to lambda and not named functions seems complicated and evil to me.

Even if true removing anonymous functions just because they're not often appropriate doesn't seem like a good decision to me, and can lead to some pointless redundant naming of functions.

That said, I think it's fair to say that more Perl programmers will prefer Ruby to Python.

Yeah, that seems to be true in my experience.

In reply to Re^3: Perl fan being tempted with Python by adrianh
in thread Perl fan being tempted with Python by jeyroz

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":