LWN.net Logo

Perl 6? Yeah, right.

Perl 6? Yeah, right.

Posted Sep 21, 2006 5:56 UTC (Thu) by moxfyre (subscriber, #13847)
Parent article: Perl 6? Yeah, right.

First of all: Chase, this was an awesome, awesome article. One of the greatest dev articles ever on LWN, I think. Really an excellent and clear summary of the mess that is Perl 6 :-)

I'm a long time Perl hacker, cut my teeth on CGI scripts then worked on a huge variety of text processing utilities at a speech synthesis software company.

But I got around to learning Python a few months ago, and I have to say I was really impressed. I think it's no wonder that developers have flocked from Perl to Python:
* Perl may still have an edge in terms of the sheer number and variety of CPAN modules, but Python is extremely versatile too. There's nothing I've needed to do in the past few months that didn't already have a Python module.
* Python emphasizes a very strong and specific "Pythonic" style, while with Perl it's TMTOWTDI. This makes it *way* easier for me to read someone else's code.

Above all, I find that with Python it's nearly as quick and easy to write a working program as in Perl, but Python makes it a lot harder to write a subtly incorrect program. Perl has a lot of auto-magical stuff and complicated syntax that can be a blessing, but often a curse, for developers and debuggers.

I've gravitated towards using Perl only for quick one-off scripts, and Python for everything else...


(Log in to post comments)

Perl vs. Python

Posted Sep 21, 2006 8:45 UTC (Thu) by dion (subscriber, #2764) [Link]

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.

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 © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds