User: Password:
Subscribe / Log in / New account

Perl vs. Python

Perl vs. Python

Posted Sep 21, 2006 8:45 UTC (Thu) by dion (guest, #2764)
In reply to: Perl 6? Yeah, right. by moxfyre
Parent article: Perl 6? Yeah, right.

Being an old Perl hand and having just learnt a bit of Python I think Python has weighed orthogonality higher than code readability, just look at lists:

perl lists have: shift, unshift, pop, push
python lists have: pop(0), insert(0, ...), pop(), append()

Having a pop method without a push method ought to be a hanging offence IMHO.

Same thing with sort, to do anything you need to create a lambda and declare parameters, perl is much more straight forward in that regard.

Then are the places where Python just does things strangely, like the "for ... if" construction, which is like map {} grep {} in perl but less general and IMHO uglier.

Python would be a better language if a bit more thought was put into making the language humane, rather than just work.

Oh and just a quick correction Parrot was not started as an april fools joke, only the name came from the joke.

(Log in to post comments)

Perl vs. Python

Posted Sep 26, 2006 21:56 UTC (Tue) by tuskentower (guest, #40758) [Link]

You forgot to add Python's block-by-indentation. I was initially excited to hear about Python and even told my wife to skip PERL in favor of Python for her BioInformatics script. Once I saw the block-by-indentation hersey I stayed away from Python.

I write clean code. I don't need the language to force that down my throat.

Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds