Hacker News new | past | comments | ask | show | jobs | submit login

Python produces more readable code, in my opinion, mostly because the sigils in Perl are too easy to get wrong. Also, the lack of some language features factors into this, too.

Speed-wise they seem to be pretty much a toss-up, at least for these benchmarks: http://shootout.alioth.debian.org/u32q/benchmark.php?test=al...

Admittedly I have much more experience with Python than Perl, which certainly factors into my "readability" assessment. But, thinking back, I definitely felt a lot happier about the first Python script I wrote vs. my first one in Perl.

Agreed on the 3rd-party libraries. Perl's pretty hard to beat there- although I don't think there's a Perl equivalent to scipy/numpy, is there?




Programmers produce code, not languages.

I think Python makes it hard to write readable code, because it forces unnatural constraints around your programming. If you want a two-line anonymous function; too bad -- you have to give it a name. If you think a closure would make more sense than a named class with named fields; too bad -- that's not supported.

With Python, you get a lot of code that looks the same. And that's good when the code that looks the same does the same thing. But if it's doing something different, you might miss the difference if all the code looks the same.

(The argument against TMTOWTDI is that similar things will look different, and that's bad. But the problem is that different things will look similar too, and that's also bad. It's simply a Property Of The Universe that There Is More Than One Way To Do It, and pretending that there's not is a fool's errand.)


My impression from using a little Python recently is that it could nicely be replaced by JavaScript. Both seem to have a similar amount of convenience syntax (just in different areas), but JS is more flexible.


> I don't think there's a Perl equivalent to scipy/numpy, is there?

There's PDL. Whether you prefer the Python equivalent to the Perl equivalent seems (to me, at least) to depend on what you think of Fortran.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: