7 ms·
Perl is great for programming, it ranks high on creativity, expressiveness, conciseness, and general language coolness. Perl is horrible (relative to other cho
by efsavage 16y ago
Perl is great for programming, it ranks high on creativity, expressiveness, conciseness, and general language coolness.
Perl is horrible (relative to other choices) for development, it ranks low on readability, refactorability, consistency, dependency evolution.
- sigzero 16y agoI agree with your first line. Totally disagree with your second line. Most of the second line is on the programmers shoulder.
- efsavage 16y agoIt is, but difficulty in requiring diligence in such a creative environment is the reason Perl has failed for larger team development. I was once praised for the readability of my Perl code by a junior teammeate, and immediately scolded by the best Perl programmer on the team with "yeah, because he makes it look like C code". Don't get me wrong, I like perl, I just think its unique characteristics make it a poor choice for complex, long-term software, which is where the most money is, and thus the most people/candidates.
- viraptor 16y agoReminds me of getting an answer from Tom Christiansen on stackoverflow. Most of his answers follow one of the two typical patterns: 1. an extended regex to do what you want in every encoding known to man, extended to use cases you never mentioned, taking 10+ lines to replace one character with another (with occasional angry remark about random other language where "it's impossible to do that") 2. "it doesn't work, because you're not using my standard boilerplate" - followed by 20+ line boilerplate setting a lot of different things where most of them are not even remotely related to the question... because everyone should be using his boilerplate...
- draegtun 16y agoTo be fair the boilerplate does catch the usual beginners mistakes: http://stackoverflow.com/questions/4272816/using-dumper-not-triggering-a-failure/4272858#4272858 http://stackoverflow.com/questions/4272816/using-dumper-not-...
- viraptor 16y agoMy point was that majority of that answer was completely offtopic. I'm not disagreeing that it catches the mistakes - but that this reminded me of the attitude described in the post above. tchrist might be a known perl person... but this comment was confusing at best - only one line actually relates to the question - "use autodie;". You must be also full of yourself to actually write something like "If you had begun with the standard boilerplate" - where "standard boilerplate" is actually "something I use" - and expect anyone else to actually use it.
- draegtun 16y agoYes answers like this can be off putting but they are steered more towards the teaching you how to fish and are often be more valuable in the long term BTW... sorry to be pedantic but it was the use warnings and not the use autodie that caught the problem.
- RyanMcGreal 16y ago> Most of the second line is on the programmers shoulder. Train-and-blame is a poor and ineffective way to ensure quality and consistency. Good engineering designs quality and consistency right into the system. It's possible, for example, to write ugly, unreadable code in Python, but the language design itself strongly pushes you toward writing elegant, readable code.
- chromatic 16y agothe language design itself strongly pushes you toward writing elegant, readable code. The language design itself strongly pushes you toward indenting the way Guido indents. The rest (effective decomposition, good naming, testing, intelligent default behaviors, algorithm choice, comments and documentation) is on the programmer's shoulder, as it is in every language.
- berntb 16y agoThat language war comment (w/out a reference) was voted to 8 in fifteen minutes... :-) Edit: 17 after an hour. Try writing a language flame without references to studies or anything about e.g. Python in a Python discussion -- and see how the votes go...
- efsavage 16y agoIt's called an opinion. Apologies for the lack of footnotes* *Not really** **This is called sarcasm.[1] [1] http://en.wikipedia.org/wiki/Sarcasm
- berntb 16y agoSo troll any other language discussion then, without any support? :-)
- berntb 16y agoOK, after a couple of beers on the way home... I'm not shocked that you like to troll language wars, I've been a kid myself. (And if you do this after 30, please don't tell me -- I'd like to keep some illusions about humanity.) What do shock me is that this kind of sh-t gets upvoted by so many on HN. I have lost a lot of respect for a couple of open source language cultures, the last year or two. Which is damn sad.
- singular 16y agoBecause programming is such a study-able thing... except it isn't. Too many factors to take into account, not least individual developer ability/experience/etc.
- rjbond3rd 16y ago> Perl is horrible (relative to other choices) for development, it ranks low on readability, refactorability, consistency, dependency evolution. The flip side is that other languages are tediously verbose, require IDE's, lack flexibility, and need frameworks to accomplish the simplest of things. Language-memes. Less fun than they used to be :)
- efsavage 16y ago> require IDEs http://osteele.com/archives/2004/11/ides http://osteele.com/archives/2004/11/ides
- jedsmith 16y agoYou're using 'other languages' as an awfully broad brush, as that certainly isn't true for all languages with the exception of Perl. No language requires an IDE, either.
- masklinn 16y agoModern Java is downright painful to develop longhand, in a regular text editor.
- presidentender 16y agoDitto C#.
- didip 16y agoWriting c++ is painful without IDE as well. Come to think about it, the same can be said about Objective-C
- kenjackson 16y agoHonestly, every language I've ever used it painful without an IDE> I should never ever have a typo in my code. "Oh, I meant to say stackFrame, not stackFram... silly me". If that happens, your dev environment is broken.
- Roboprog 16y agoYou forgot to add that Perl is also pretty fast, in terms of execution: http://roboprogs.com/devel/2009.12.html http://roboprogs.com/devel/2009.12.html For small tasks, Perl is my language of choice. Of course, there are no small Java programs - every data structure requiring a separate class, and every class (in some shops) requiring a separate source file, etc. A small amount of Perl can get much done. I like being able to write small functions with clearly defined inputs and outputs, even if a routine has multiple outputs (suck on that, java!). Contrast with the 500 line java subroutine with 100 separate variables blendered around (no clear data flow) written by some apathetic slob. I have only had one project large enough in Perl to justify OOP techniques, years ago. I've given up trying to persuade The Management to use Perl. It's just too much easier to find java work, especially here in the wilderness (Sacramento area).
- grammaton 16y agoArguably Ruby and Python rank just as high, if not higher, on all of the first line, and do so without Perl's cruft and bloat. There's more to a language than just it's syntax, and even if Perl can have some pretty compact syntax - and it certainly can - that doesn't make up for it's weaknesses in other areas. Namely, it's Object Oriented programming that is a bad joke, it's weak-ass multithreading, the fact it's a walking memory leak, it's attempt to shoehorn two completely different variable scoping paradigms into one language, it's vast and bewildering array of special cases and exceptions to it's own rules....I could go on and on. Disclaimer: I have used a great deal of both Perl and Ruby.
- kscaldef 16y agoWait, are you saying that Ruby _doesn't_ have "weak-ass" multithreading, horrible memory leaks, and screwed up variable scoping?
- grammaton 16y agoCompared to Perl?
- tsuraan 16y agoOne nice thing about ruby is that it has quite a few viable implementations floating around. MRI or YARV are probably what you have installed on your computer by default, but if multithreading and sane garbage collection are concerns of yours, JRuby is the right implementation to target. I'm not sure what's wrong with ruby's variable scoping, but I haven't used it for a while, so my memory of the ugly details of the language is a bit dim :)
- joe_the_user 16y ago"One nice thing about ruby is that it has quite a few viable implementations floating around." That's not nice all in my opinion. I don't want "choice" concerning what implementation of my language to use. Unless I have some strange, specialized need, I want one implementation that is guaranteed to work. I mean, the point of a garbage collected language is ... I don't have to worry about the garbage. If I have to make special study to find which implementation has " sane garbage collection", then this purpose been lost. The various versions are forks and for forking to work, the winner needs to be picked really quickly to allow us to move on. The thing about C++ is GCC is good enough almost everywhere and any other implementation is going to have to be as good as that. There are good things about Ruby but dueling implementation breeding uncertainty is not one of them.
- KaeseEs 16y agoI am curious about several things in your second line, mostly the refactorability claim, though. Perl has great testing tools, and its community has embraced them wholeheartedly for a decade* . I find the ubiquity of TDD-like practices among Perl developers make refactoring a dream. * The very first Perl release in 1987 actually had a test harness which eventually grew into the modern TAP system, but the 'testing revolution' in the community dates to 2000 or so