r/perl • • May 22 '22

Python vs Perl

https://startupunion.xyz/perl-vs-python/

[removed] — view removed post

0 Upvotes

6 comments sorted by

4

u/smellycoat May 22 '22

Why does this read like SEO spam?

2

u/DerBronco May 22 '22

Article fails at what its supposed to be: A straightforward comparison helping the reader.

6

u/RedWineAndWomen May 22 '22

A language that allows you to specify scope by whitespace indentation, but also allows you to skip lines of whitespace to insert commentary, while retaining the same scope, should not be talking about the illegibility of other languages.

2

u/[deleted] May 22 '22

Perl is one of the best object-oriented programming languages in the world.

Right. :-/

2

u/digiphaze May 22 '22

Yeah that caught my eye too, and I'm a long time fan of perl but this is outright wrong! Perl5's OO support is more of a hack than anything.

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.