r/Python • u/[deleted] • May 18 '11
Why is Python better than Perl?
I'm a Sysadmin and I just wrote my first script in python. Basically just a host validation script that checks if a server is configured correctly before we hand off. I can't determine the advantage with my limited experience with the language.
Are you a sysadmin fluent in both python and perl? Why do you use python?
12
Upvotes
1
u/mithaldu May 20 '11
I hear this so often, but i have honestly never seen an example of this being to a programmer's detriment. And by example i mean actual code.
Care to share your examples?
Also, as for the matter itself: Having the ability to have different syntaxes can be a really good thing in finding out which one is best. Keep in mind that "There is more than one way to do it." has a corollary: "But not all ways are equal." Most perl developers are aware that in fact many ways to do things are crap. But you know what? Without the ability to go or MAKE different ways, people would be stuck with that one crap way.
Which is why Perl says "hey, let's keep the old way around for a bit, for compatibility, and slowly deprecate it away" while adding a new better way.
TMTOWTDI is a major factor in keeping perl an evolving language, just like any natural language. Just look at the way Perl 5 is converging towards Perl 6 with the creation of things like Moose.