> I took great pride in making readable, maintainable perl.
In the past when I used perl, I did the same thing.
But I came to learn one thing about perl - its good point is its bad point.
When I used it, perl was the highest level language I ever used. It was expressive, meaning I could take an idea in my head, and implement it in perl with the least friction of any language.
When I worked with other people's perl, I found they were mindful and cared about what they were doing.
But the way they thought was sometimes almost alien to me, so the expression of their thinking was a completely different type of perl, and it was lots less readable to me. And frequently the philosophy of what they wrote was backwards or inside out from what I would do.
Now I have replaced perl with python day to day and although implementation of code seems a few steps removed from my thinking, it seems that other people's code is more easily read and understood. (this is just my opinion)
As they say, with perl there's more than one way to do it (TMTOWTDI) and with python there is only one way.
Both approaches have their merits. Like with maven, where I once saw a question on a forum that was like "how do I do X?" and the reply was basically "You can't, don't try to do so, as that's wrong".
There is usually more than one way to do it in Python, too. For example most people's Python fizzbuzz seem pretty different from mine:
In Python, there should be one obvious way to do it. Your way is clearly a joke or an abomination.
You are funny. I love it.
That's an interesting point that could be even more interesting with some examples on both languages.
I don't have any code examples, but I recall:
- a lot of things I did in perl ended up using regular expressions
- in comparison python use of regular expressions is not first-class so many problems would use string functions instead. (although r'<expr>' was less ambiguous wrt quoting rules)
- in perl path manipulation would use regular expressions
- in python I embraced os.path
- I would use oo in python, but rarely in perl
- argparse