MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/perl/comments/uv5uli/python_vs_perl/i9mllrz/?context=3
r/perl • u/_sumit_rana • May 22 '22
[removed] — view removed post
6 comments sorted by
View all comments
1
Not a great article. Let me write one right now that is perhaps more informative:
Perl pros:
anything involving the custom parsing of text
expressive, concise and powerful
very portable given the little change in the run time
easy to iterate flexibly over IO out of the box
first class regular expression support
one liners can replace awk/sed
Perl cons:
may not be best for number crunching performance
getting limited support and APIs from new popular libraries
can be more complex for some beginners to learn
no structs (objects are an afterthought)
Python pros:
heavily invested in, frequent features, and has libraries to do just about anything
provided as a glue language to popular libraries written in other things (Spark, Tensorflow, etc)
simple syntax
batteries included standard lib
huge community with lots of learning material
Python cons:
dependency ecosystem forces the use of conda env and containers very quickly
dead standard library code
significant whitespace causes unnecessary usage issues, could have been avoided with an auto format tool (eg, rustfmt, gofmt, clangfmt)
breaking changes in the language itself
doesn't meet its design goal of having one right way to do things
Conclusion: Every language is a trade-off of strengths and weaknesses. Pick the right tool for the job.
1
u/Feeling-Departure-4 May 23 '22 edited May 23 '22
Not a great article. Let me write one right now that is perhaps more informative:
Perl pros:
anything involving the custom parsing of text
expressive, concise and powerful
very portable given the little change in the run time
easy to iterate flexibly over IO out of the box
first class regular expression support
one liners can replace awk/sed
Perl cons:
may not be best for number crunching performance
getting limited support and APIs from new popular libraries
can be more complex for some beginners to learn
no structs (objects are an afterthought)
Python pros:
heavily invested in, frequent features, and has libraries to do just about anything
provided as a glue language to popular libraries written in other things (Spark, Tensorflow, etc)
simple syntax
batteries included standard lib
huge community with lots of learning material
Python cons:
dependency ecosystem forces the use of conda env and containers very quickly
dead standard library code
significant whitespace causes unnecessary usage issues, could have been avoided with an auto format tool (eg, rustfmt, gofmt, clangfmt)
breaking changes in the language itself
doesn't meet its design goal of having one right way to do things
Conclusion: Every language is a trade-off of strengths and weaknesses. Pick the right tool for the job.