Skip to content

Instantly share code, notes, and snippets.

@hzhou
Last active June 28, 2022 08:14
Show Gist options
  • Save hzhou/bfff11bc0650826db10a2a519acd0fb5 to your computer and use it in GitHub Desktop.
Save hzhou/bfff11bc0650826db10a2a519acd0fb5 to your computer and use it in GitHub Desktop.
Perl Philosophy vs Python Philosophy

Perl's motto is, "There is more than one way to do it."

Python's motto is, "There should be one — and preferably only one — obvious way to do it."

Perl's way has a few requirement: you need understand your problem; you need understand your tools; you need understand that your problem is often unique and the (best) solution depends on many factors including the nature to the problem, the mechanisms of your tools, as well as your experience. Perl's way is how we solve our every day problems -- not by following templates -- by applying common sense.

Now let's say you don't really understand your problem, or more often, you don't really understand your tools. Then typically you would be forced to read manual and follow the instructions. And often, you want to fit your problem into the model that the manual of your tool describes. In this situation, you certainly would wish there is only one (obvious) way to do it.

In the early days, programmers are intrinsicly hackers, problem solvers and far in between. They rarely expect their problems to be typical and they rarely expect their jobs to be part of a workflow. The philosophy -- there is more than one way to do it -- makes sense.

Today, most programmers are simply doing jobs. They expect their problems to be typical, and they don't expect themselves to understand the tools. They only expect themselves to be part of a workflow. To them, the philosophy -- there should be one obvious way to do it -- makes perfect sense.

@matthewpersico
Copy link

"Today, most programmers are simply doing jobs. They {programmers} expect their {programmer's} problem to be typical and they {programmers} don't expect them{huh????} to understand the tools. They only expect themselves to be part of workflow. To them, there should be one obvious way to do it makes perfect sense."

Can you explain which "them" you're referring to?

@hzhou
Copy link
Author

hzhou commented Mar 20, 2021

Can you explain which "them" you're referring to?

Sorry for the late reply. It should be -- "they don't expect themselves to understand the tools".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment