6 ms·
Alternate title: "8 Reasons Not to Use Perl". Why do people who use Perl get such a kick out of junk like this.
by pmorici 17y ago
Alternate title: "8 Reasons Not to Use Perl". Why do people who use Perl get such a kick out of junk like this.
- berntb 17y ago>> Why do people who use Perl get such a kick out of junk like this. 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 http://news.ycombinator.com/item?id=963706
- gaius 17y agoIt's a cultural thing. 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". In other words, every other language community cares more about what you do than how you do it.
- gloob 17y agoThe question was: 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.
- gaius 17y agoIt's merely an observation. See how many times the word "wizard" appears in the Perl documentation. Then try the same in, well, any other language. There's no war to fight. Perl has its place. I might even use Perl again if I need a throwaway 10-liner.
- brk 17y agoPerl has "wizards" Ruby has "rockstars" and so on. They are all irrelevant monikers. Use whatever works for YOU. Taking the conversation any further is as pointless as any other religious war discussion.
- mst 17y agoUNIX has "wizards" too - and perl's origins as a super-awk place it firmly in the UNIX cultural tradition in a lot of ways. 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.
- jrockway 17y agoIndeed. Perl has many sub-communities. Some "wizards" enjoy obscure syntax. Other people enjoy figuring out new ways to make reusing code easier. Some other other people enjoy talking about testing. Some people do all three. etc., etc. 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.
- berntb 17y agoI honestly can't say if the GP (gaius) is a parody of a language fanatic or a troll. (-: Or if it's a Ruby guy giving Python people bad reputation. :-)
- gaius 17y agoI'm an old Tcl guy ;-)
- mst 17y agoNo. Sorry. You're confusing the old perl4 culture with modern/enlightened perl culture. 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-bicycle http://shadowcat.co.uk/blog/matt-s-trout/pizza-snakes-bicycl... for a longer but hopefully better attempt at explaining what I mean.
- jrockway 17y agoTotally untrue. 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?
- omouse 17y agoIf these things are almost never used or should never be used, why are they allowed to exist?
- bmj 17y agoTMTOWTDI (http://en.wikipedia.org/wiki/There%27s_more_than_one_way_to_do_it http://en.wikipedia.org/wiki/There%27s_more_than_one_way_to_...) Such freedom is at the core of the language.
- jerf 17y agoFor the most part, they don't exist! Only the <=> operator in that list actually exists. The rest are combinations of perfectly sensible operators. "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.)
- pyre 17y agoYes. But you forgot to mention that, "People who need to get Real Work(tm) done use $my_favorite_language."
- billswift 17y agoPeople with brains tend to be rather playful. Creative people tend to be playful with their tools (see the origins of many styles of visual arts and music).
- tdavis 17y agoPossibly because all people are not you. Life is more interesting that way.
- elblanco 17y agoPerl is designed around linguistic concepts. You may as well ask "why do people who use language get such a kick out of junk like this:poetry, rhymes, prose, novels, etc.?"
- pmorici 17y agoI don't think it is but to go along with the metaphor, those things you list are methods of conveying stories and emotions. A programming language is a method for conveying instructions to a machine. Theses would be 8 reasons not to use any human<->machine language. The Perl biosphere just seems to produce non-sense like this as a matter of routine. To me posts like this are about on par with pictures of cats.
- chromatic 17y ago> A programming language is a method for conveying instructions to a machine. The preface of SICP disagrees (see http://mitpress.mit.edu/sicp/front/node3.html http://mitpress.mit.edu/sicp/front/node3.html ), with a quote many, many programmers can quote in spirit if not to the letter.
- Semiapies 17y agoThese operators sound even worse for people to read; perhaps that's why they're obscure.
- elblanco 17y agoI don't know why you got downvoted so hard, I think you have a fair opinion (even though I disagree with it). IMHO, the absolute best programmers I've ever worked with looked at programming as a game, as something clever to do. They reveled in the beauty of elegant code, and they got angry when reading bad code, and laughed heartily at particularly clever code etc. To them, they had internalized the language of the machine and were trying to create art with their code, not science. One thing that I've never been unsure of is that L. Wall understands that machines can be approached 2 ways, either as a raw tool, issuing instructions to be completed precisely as directed. Or the other approach, which is to think of the machine as a being (albeit one with a particularly different kind of mind) and the language is a lingua franca that you can use to communicate with it. Perl false squarely on the side of a programming language being a language (in the communication sense) vs. being a language (in the "set of instructions" sense). The reason Perl 1 liners are so interesting, for example, is that they convey implicit little secrets between you and the machine, much like you might do with a certain kind of nod to a friend at a party when a certain topic comes up that conveys a world of meaning between you and your friend. The reason these little "operators" are so witty is that they convey lots of meaning between you and the machine relatively simply, and look clever at the same time. I think most programmers at one time or another realize that though, in theory, computers are supposed to do exactly what you've told them to do, the ecosystem their software is running in is just on the edge of nondeterminism and wish for a way to convey to the computer what they "mean" for it to do rather than what they tell it to do. "Machine, I wish for you to open this file and count the number of times the words foo and bar show up in it". Perl is targeted at these kinds of cases. That's now to say that other languages are bad, just different. Perl also has the unnerving ability to so quickly become obfuscated that it can be very hard to untangle by another developer. Languages like Python aim for code simplicity and readability and thus are much more suitable to large scale development practices than Perl is (that's not to say that Perl isn't used in these kinds of large projects, or that Python isn't used for one off scripts).
- mst 17y agoIn which case, I'd claim that http://www-users.cs.york.ac.uk/susan/joke/unix.htm http://www-users.cs.york.ac.uk/susan/joke/unix.htm must be a lot more than eight reasons not to use UNIX? Really. We get a kick out of it because it's fun. I don't understand why people consider a bit of light humour junk; maybe it just means they don't get the joke - but I often wonder if it more means that they take programming too seriously. I enjoy my job. I enjoy jokes related to my tools. I'm really sorry you don't.
- pmorici 17y agoNot the same. No one is going to read that and then try to use those in their work. I suspect people have read this article and thought "dam those might come in handy, let me bookmark that."
- jrockway 17y agoPlease let me know when you find a language that doesn't have "8 reasons not to use it". I will switch immediately.