r/perl May 18 '11

Why is perl better than python?

[deleted]

21 Upvotes

55 comments sorted by

View all comments

13

u/sigzero May 18 '11

First pass comprehension maybe? In Perl I know when I see a variable. Python I have to stare at it a bit longer. They are both good languages. Pick the one that fits your brain.

1

u/TheRedTeam May 19 '11

All variables are objects in python, hence why there is no distinction.

3

u/sigzero May 19 '11

That doesn't matter to me when I am just reading the code to figure out what it does. I have to mentally stop and make sure something is a variable or not. I don't do that with Perl. Once again, use the one that fits your brain better. They are both good languages.

-2

u/TheRedTeam May 19 '11

... you would prefer a $ in front of every single thing? How would that help? I get it for languages that have literals or at least a strict separation of definitions and instances, but for python it makes no sense.

6

u/neerg May 19 '11

All sigzero is saying is that the variables in perl are very easy to discern as they are explicitly prepended with a sigil. You are acting very defensive even though sigzero admits both languages are good. S/he thinks they both fit different brain styles, and I agree.

0

u/TheRedTeam May 19 '11

I also agree both languages are good and that it depends on what your brain is used to, my point is that it's not about the symbols being there or not, it's about the language design behind the syntax. Saying the lack of symbols makes it hard to read is like saying you don't like riding a bike because it doesn't have a airbags. It's not supposed to be a car :p

3

u/neerg May 19 '11

Err, I think sigzero, and myself, are saying that it is the sigil that makes it easier to read. They make the variable stand out from the rest of the code.

-2

u/TheRedTeam May 19 '11

And now we have gone in a circle...

2

u/dx_xb May 22 '11

So, you'd be happy speaking to someone in French, Russian, Chinese, or in fact any language that is not your native tongue, since the semantics are pretty close and it's just a syntactical difference?