8 ms·
Perl: Kicking your languages ass since 1988
- BudVVeezer 17y agoPerl -- the world's premier write-only language.
- hga 17y agoWell, it has survived APL and TECO....
- melling 17y agoA bit of a cliche response. The fact is one can write maintainable code if they so choose and 20+ years later people are still solving real problems with it. It would be great if they cleaned up the language a little and finish Perl6, but in the meantime, Perl 5.x and CPAN (http://www.cpan.org/ http://www.cpan.org/) are still quite relevant.
- njl 17y agoI've been under the impression (tongue firmly in cheek) that Perl 6 is called "Ruby".
- mmaunder 17y agoNo, it's called Rakudo. http://dev.perl.org/perl6/ http://dev.perl.org/perl6/
- njl 17y agoMind, I'm not deeply involved in either the Perl or Ruby communities, but... The de jure successor of Perl 5 might be Perl 6, but the de facto successor is Ruby. That is where the momentum and mindshare has gone; my impression is that Perl is easing back into it's old home as AWK's big brother. In all honesty, how often do you hear about somebody writing a web application in Perl these days? While my personal experience isn't really admissible as evidence, all the people I know who used to write web apps in Perl are now writing web apps in Ruby. A bunch of the ones who used to do system administration with Perl are now working at Opscode doing systems administration in Ruby.
- berntb 17y agoIf you argue web apps, at least locally, PHP is kicking ass with Perl, Ruby and Python. Amongst others. (And then, the hype and FUD is quite heavy on the ground, re Perl. Not least on HN.)
- peterwwillis 17y agothis is, to me, evidence of why Perl is a great language. it's not something people pick up to write web apps. you can write very good web apps with it, but there are better options. but you can also use it to write virtually any kind of application - and the libraries and supporting modules already exist to allow you to complete it, quickly and well. you can probably use Perl for a wider array of apps than any other language (largely due to CPAN). i just wish people who don't know how to program with it would stop picking it up and getting things done. my company's 10-year old Perl webapps are still chugging along just fine, btw.
- chromatic 17y agoRuby 7, perhaps. Ruby would have to adopt a module import system, multidispatch, a better object system, generics, optional typing, macros, and something resembling grammars to come close to what you can use in Perl 6 right now.
- jrockway 17y agoJudging by the number of patches I get for my modules, I would say that this statement is false. Or everyone on the Internet is just really, really smart.
- swolchok 17y agolanguage's (or languages')
- mmaunder 17y agoPerl developers can't spel either. [Thanks, I fixed it] BTW, I'm a huge fan of Ruby. I sincerely hope it has the legs Perl has and one day is it's equal or better. Perl's invent-your-own-OO-syntax is it's worst weakness - and that's what Ruby brings IMHO. So I'm very grateful to all the early adopters who are so passionate about Ruby. Having said all that, keep a close eye on Perl 6. There will be some big developments/announcements this year.
- pyre 17y ago> Perl's invent-your-own-OO-syntax is it's worst weakness - and that's what Ruby brings IMHO. That being said, there are a number of languages that have things in them that feel like dirty, dirty hacks. There are few languages that are fee from these sorts of things.
- stcredzero 17y ago"There are quite a few languages that let you earn a fee from these sorts of things." Fixed that for you! </humor>
- berntb 17y agoSo, how do you feel about Moose? Is there any better OO implementation in a mainstream scripting language?
- jamesbritt 17y ago" So I'm very grateful to all the early adopters who are so passionate about Ruby." Ruby is 15 years old. When do users stop being considered "early adopters"?
- beej71 17y agoI didn't realize I had a "languages ass" on my person. But come to think of it, I do believe I had it kicked when I had to refactor a giant Perl program for HP many many years ago. It definitely left me with a lasting impression.
- pyre 17y agoBad code and poor design can happen in any language. Basing an argument on how 'good' or 'bad' a language is around anecdotes that contain either of those is the equivalent of setting up a strawman. [ Note: I'm not talking about bad code in the languages core interpreter/compiler/vm nor am I talking about poor design decisions in the languages themselves. ]
- mkramlich 17y agoI think the valid criticism of Perl is not to say it's bad but to say that compared to the alternatives, it's farther from ideal, in certain important dimensions. Perl lives in the same world with Python, Ruby, Java, Clojure, etc. so whenever one can reach for Perl one can also reach for any of those other languages. It's not that bad language yields bad code, it's that people who are picky want good code AND the best language to express it in. In some folk's minds, there are languages available to them that have the same strengths as Perl, can be used in the same role as Perl, and yet have less of it's imperfections. I think that's the strongest case against it. Not that it is a "bad" language, necessarily.
- berntb 17y agoThere are advantages/disadvantages with everything. Can you for example show me which of those languages have a better OO system than Perl 5 with Moose? Oh my, how things change... :-) I'd argue that Perl's main disadvantages are two -- the relentless trolling and that it probably has a bit harder learning curve for people to do it right. (Java isn't really in the same niche; it is more of a system language and e.g. doesn't compete in development speed with scripting languages. How is it these days -- the scripting languages on the JVM are still mostly interpreted, btw?)
- teilo 17y agoIn the spirit of answering the ridiculous with the equally ridiculous, I offer the following response: Mark: "Perl is a powerful language. It’s also fast and everything you need has already been implemented, debugged, refactored, reimplemented and made rock solid. If you ever have a problem, it’s already been solved by someone else." Me: "That's just what I've been saying all this time! Everything that can be invented has already been invented. Don't waste your time trying to do it better, you silly young bucks. Now get off my damn lawn!"
- pyre 17y agoI think the problems lie in reimplementing something with disregard for the experiences gathered when it was implemented the first time. There are plenty of times where solutions a wiped up to age-old problems that only work in the most common of cases, and cause huge headaches when the edge cases are hit. On the other hand, mature solutions with wide user-bases have already run into and solved these problems. Basically, there's no point in re-inventing the wheel unless you're meaning to improve the existing implementation or at least bring something new to the table. Too many times things are re-implemented and labelled as 'new and improved' even though they are a decided step backwards. All of that said, I think that original statement was meant to be a push-back against the prevailing 'wisdom' that Perl is dead and that you should really be onto something like Python or Ruby like all of the 'cool kids' are doing. (i.e. "Don't discount Perl, it has many solutions to offer you.")
- viraptor 17y agoSomeone drank the Kool-aid. "everything you need has already been implemented, debugged, refactored, reimplemented and made rock solid." -- right... I have enough of "broken-module forcing a manual rebuild of half of existing modules" stories to fuel my nightmares for life. There are broken modules, there are specific-distro-and-version-only modules, there are undocumented modules, etc. I'm not sure I believe any serious Perl programmer never run into those problems.
- pyre 17y agoI'm sure it's possible to avoid most of those issues by only sticking with mainstream packages.
- viraptor 17y agoHe wrote "everything you need". I'm not sure why you want to limit it to mainstream. Of course mainstream stuff is of better quality than some rare packages, but that's not what he said and not what disagreed with.
- pyre 17y agoSo you're going to tell me that rare and 'fringe' package for Python, Ruby, <insert language here> are up to the level of highly supported main-stream packages?
- jrockway 17y agobroken-module forcing a manual rebuild of half of existing modules Very few modules are actually "built". Most building is just "cp lib/* $PERL5LIB". If you mean some module required a newer version of another module, and that new module was installed... yeah, that happens. That's why there's a dependency management system. There are broken modules, there are specific-distro-and-version-only modules, there are undocumented modules, etc. Some people think one bad apple spoils the whole bunch. Others think a rotten apple is better than no apple at all. It's usually the second group that has working applications, and the first group that whines on social news sites about how bad everything is. Just sayin'.