Alternative question from the last half dozen times I've seen Perl mentioned in a good light on HN:
Why do Python/Ruby/X people get such a kick out of language wars?
It was well formulated here: http://news.ycombinator.com/item?id=963706
Alternative question from the last half dozen times I've seen Perl mentioned in a good light on HN:
Why do Python/Ruby/X people get such a kick out of language wars?
It was well formulated here: http://news.ycombinator.com/item?id=963706
In other words, every other language community cares more about what you do than how you do it.
Why do Python/Ruby/X people get such a kick out of language wars?
Your response was:
Python people value doing complicated things with simple code. Perl people value doing simple things with obscure language features, then basking in the glow of being called a "wizard".
Methinks there's a disconnect somewhere here.
There's no war to fight. Perl has its place. I might even use Perl again if I need a throwaway 10-liner.
They are all irrelevant monikers.
Use whatever works for YOU. Taking the conversation any further is as pointless as any other religious war discussion.
I write more perl than anything else but I work in shell, make, perl and C regularly depending on what level I'm trying to work at (and often think in lisp for prototyping).
UNIX is my IDE. perl5 is my VM. CPAN is my language.
Basically, "Perl" is a very large community, and different people in the community use Perl for different things. Some just want to have fun and others have real engineering problems to solve and are solving them with Perl. Perl is welcoming to everyone. It's a shame that people think the playful applications of Perl make it unsuitable for real work.
We value doing complicated things elegantly so that the program so produced best reflects the intent of the programmer. So yes, that's caring about how you do it.
We care about "how you do it" because expressivity brings readability and maintainability.
The key difference is that python optimises for having one common idiom for a given thing and achieving expressivity through the way these idioms are structured together. Perl tends to have multiple idioms for a given thing and achieve expressivity through which one is used for a given reason.
See http://shadowcat.co.uk/blog/matt-s-trout/pizza-snakes-bicycl... for a longer but hopefully better attempt at explaining what I mean.
Personally, I never use any of these constructs. I never see them in any modules I use. None of my friends use these. (And trust me, if you know Perl, you know my friends.) The only place I see them is during conference talks about "strange things that happen to be possible with Perl syntax".
Do I know what they do? Yes. Would I freak out if I saw them in someone's code? No. Would I add them to my own code when a clearer construct would suffice? Never.
Just because you would never use these constructs in Real Code doesn't mean that this is not something that's fun to think about. Are you a code monkey, or can you step back from the "must implement maintainable application in 42 hours OR DIE" and enjoy the art of programming?
Such freedom is at the core of the language.
"Why does Haskell have (.) . (.)?" It doesn't. It's just a combination of legal characters that happens to also be a joke.
(And as wacky as <=> may appear, in the context of Perl, with its separate string vs. numeric comparison operators, it's not even that strange. It is a combination less than, equal, or greater than operator. "cmp" is the equivalent for strings.)