4 ms·
Although I'm a Perl zealot, I must admit that the thought of trying to understand someone ELSE's Perl code is horrifying. This is because although everyone writ
by mayank 16y ago
Although I'm a Perl zealot, I must admit that the thought of trying to understand someone ELSE's Perl code is horrifying. This is because although everyone writes beautiful maintainable Perl code, everyone else's Perl code is horrific.
On another note, what are the chances that this thread is going to turn into a PedantoNerd flamewar.
- presidentender 16y agoBWARGH NO PERL IS DEAD But really, I think you hit it right - because the language displays such a lack of orthogonality, ten perl coders will write the same line of code ten different ways, and everyone will favor his own constructs.
- gaius 16y agoIt is possible to write clean, easy to maintain Perl. However the people with the inclination to do that left for Python, because you earn respect in the Perl community by being a "wizard", i.e. implementing a common task using obscure language features. In contrast, to earn respect in the Python community, you write boring code that does something interesting.
- btilly 16y agoClearly you are not a member of the Perl community. Or else you wouldn't have such big misconceptions about it.
- prodigal_erik 16y agoIt seems there are two Perl communities. One is the horde who have been playing code golf and writing horrifying crap since 1987, and the other is the Modern Perl guys who are actually trying to create a robust language (except that it'll be based on Perl, for reasons that escape me). The last time I saw Moose come up, I was told that only 5% of CPAN has adopted it to date, so I think the influence of Modern Perl on the mainstream has been overstated.
- perigrin 16y ago5% of 21,163 is still over 1000 modules. That is nothing to sneeze at. For a module that is only four and a half years old, that is an average of about 4 new modules a week published to CPAN that depend on Moose. If you look at the time and effort that goes into releasing a package, figure at least 8 hours (one day of work) that is conservatively $200 of effort minimum? So would you be interested in a company that averaged four "sales" a week worth a couple hundred dollars each, sustained over four and a half years? And that is just the code that escaped to CPAN.
- phaylon 16y agoYes, let's change all OO CPAN modules to use a new library, just for the heck of it. Let's not care that all of these libraries work great and are used in production. Transition takes time, welcome to software development.
- gaius 16y agoFormer member. I'm one of those who left for Python.
- phaylon 16y agoNot sure which Perl you left, but it's not the one I'm using :)
- phaylon 16y agoThis is not true at all. Clean code, documentation, testing, are very highly regarded in the Perl community.
- btilly 16y agoalthough everyone writes beautiful maintainable Perl code, everyone else's Perl code is horrific. I do not buy this. I've maintained plenty of good Perl written by plenty of other programmers. I've seen bad Perl as well, but I've generally believed that the same developers would have produced bad code in other languages. I believe that the experienced developers I've worked with would generally say the same. From what they've said, they've categorized more of mine on the good side than the bad. I admit that there are occasionally cases where very good code is very difficult to read. Those cases are very rare, but not entirely non-existent. On those occasions I've been glad that Perl gave me the rope to hang myself. However if you find yourself in this position on a routine basis, you should ask what you are doing wrong. Because that shouldn't happen. Really. (Note, I'm not a Perl developer at the moment, but I was for 11 years. I've never considered myself a Perl zealot.)
- jrockway 16y agoSame. I took my current job and the Perl code did not look too different from mine. If anything, they tried a lot harder to make it look nice than I do. I work on a lot of open source Perl, and it all looks the same. Sure, I can tell mst's code apart from nothingmuch's, but I never have any trouble understanding what it's doing. The community has decided on a style, and everyone gets on just fine. It's so pervasive that even people that don't hack on the code every day pick up the style; like I said before, code written by never-contributed-to-open-source don't-even-know-what-github-is coworkers does not look too different from what I'd expect. People wrote bad Perl in 1995, and I've seen it, but this problem is largely solved. (The same cannot be said about Python. I wasted two days last week debugging the XML parser included in the core! That is some legacy code...) The reason we can't find Perl programmers is because everyone likes their job. When you jump ship as a Perl programmer, it's from one bank to another, or one small web shop to another. If you're a Python programmer, on the other hand, you get to do something exciting like go from no-name-consulting-company to Google. Google, that site you visit every day and that has a ball pit and pool in their offices!! Google!! The kinds of places that do Perl tend to be boring. I may work for a bigger company than Google and affect more people, but I don't get a ball pit, I don't get free food, and I don't get to say, "oh, you know Google Reader? I added a new feature on that today." When talking to non-programmers, I try not to even mention my work, because it sounds that boring. When you work for Google, everyone thinks it's exciting. This makes it easy to find people that want to work on your language, just because there is a general feeling of coolness about it. If you're not working for Google today, then you're working to attract their attention or something. Extrapolate this anecdote to the rest of the community... and you have a hard time finding people to hire. (My employer has trouble hiring people because they try to be cheap. "Oh, well we can only guarantee you a 6 month contract, no insurance, and you have to pay to move across the country". Not a lot of people take this offer.)
- ahi 16y agoI graded assignments in a class that used Perl. Absolute nightmare. By the time I got to the end of the stack each week I couldn't tell the difference between brilliance and stupidity.
- phaylon 16y agoSomething is wrong here. You're a "zealot" but "the thought of trying to understand someone else's Perl code is horrifying"? As a Perl developer, I read other peoples code without a problem on a day to day basis.