I was just talking to a collegue, he said that he had some spare time and wanted to learn a new language... He is a UNIX head and was pondering java. I suggested he learnt perl; he asked why. That kind of stumped me, I explained how powerful the language is but without using examples 1 it was very difficult to get across.
It started me thinking, what is it in perl that sets it asside from other languages.. Is it some ethos some principle or what. In short why is perl so cool?
1. as we were walking along at the time so code was a little tricky to comunicate
--
Zigster
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: What is it about perl that makes perl so cool?
by Petruchio (Vicar) on Dec 01, 2000 at 16:18 UTC | |
This may read like a parable, but it's quite true. I minored in ceramic art in college. I saw (and threw) a lot of perfectly nice, forgettable pots which worked very well. I saw a lot of people cast utility to the wind, and forge out on their own. But their stuff usually seemed aimless, and really, though rather desperately creative, most of it was more forgettable than the pitchers and bowls. What made the biggest impression on me in three years were some teacups. A visiting artist named Mitsu made them; the bowls were rounded with a wobbly lip, and the handles looked like strange growths emerging from one side. Odd even for Japanese stuff. Then I picked one up. The handle was molded to fit the inside of my hand. A dimple in the bowl rested on my middle knuckle, balancing the bowl with the lip finally horizontal. I poured some water, drank from it, and when I put it down, it looked like one hell of a teacup. That's how ugly Perl is. | [reply] |
by OzzyOsbourne (Chaplain) on Dec 06, 2000 at 18:21 UTC | |
I'm reading along and *POW* I turn into grasshopper. I had no idea that I was going to get a lesson there...but what a parable! I liked that one sensei. (If my brain didn't flush it's cache so often, I would definitely share this with...who said what now?) | [reply] |
by royalanjr (Chaplain) on Dec 01, 2000 at 21:54 UTC | |
Roy Alan | [reply] |
Re: What is it about perl that makes perl so cool?
by BigJoe (Curate) on Dec 01, 2000 at 18:36 UTC | |
CPANThe thing that really makes Perl the ideal language for me is the community behind it.When I first started my job here I was forced to use ASP w/VBscript. There is nothing comparable to the CPAN or places like perlmonks out there. I posted a question on a site about 4 months ago and I still have not recieved a response. When I hit that site my monk instincts had me answering all these questions because there seems to be no one out there (in ASP land) willing to help each other. I believe Perl is as versitile as JAVA (if not more), but the community behind it (CPAN, PM.ORG, PerlMonks.org, O'Reilly, ActiveState and countless others). Plus the Camel maskot is a hell of a lot cooler than a cup of coffee!! --BigJoe Learn patience, you must. Young PerlMonk, craves Not these things. Use the source Luke. | [reply] |
by iamnothing (Friar) on Dec 02, 2000 at 01:23 UTC | |
Usually when I've had to ask questions on Perl in the past, I could find the answers relatively quickly, often on sites like this, where there are several replies documenting different methods to accomplish the problem at hand. Before I even asked the question. Now that I'm attempting a code conversion for our Win32 systems from a specialized language (WinBatch), I'm going to be faced with a million new challenges that haven't been answered yet. But I'm at least confident that many of them will be answered much faster than if I used C/C++. And without the hype. The other thing I love about Perl is the flexibility of the language. I can sit down and prototype the functionality quickly and make it work. Python is the only other language that I can do that with easily, and for a good portion of what I do, it's still overkill. Java, C, and C++ fall prey to a few more cycles in development for me, even though I've been using them longer (which could be part of my problem). So, the community, and the flexibility. That's why I think Perl is cool... | [reply] |
by Elgon (Curate) on Dec 09, 2000 at 00:09 UTC | |
| [reply] |
I'ts cool man
by neophyte (Curate) on Dec 01, 2000 at 16:19 UTC | |
I'm a language type of person - language as in linguistics - I like learning languages. And when I first encountered programming it was not a very pleasant experience. Then I found Perl. I started learning it and - be amazed - I found it quite easy to understand. When I got to know that Larry Wall is a linguist it became clear to me: Perl is very close to a natural language*. Just look at the Poetry section or at Obfuscation: such a wide variety of styles and expressiveness! Plus it actually can do a lot of useful things. cooooool neophyte * I'm tempted to say: closer than esperanto is, but that would not be entirely right.Update:I just found this and wanted to add the link. | [reply] |
(jcwren) Re: What is it about perl that makes perl so cool?
by jcwren (Prior) on Dec 01, 2000 at 19:01 UTC | |
I tend to prefer not to romanticize programming langauges, but select a langauge for the task at hand based on what langauge is actually best suited (within the group I'm familiar with.) The Perl langauge does have a lot of implicit power. Dynamic strings, hashes, and auto-vivication are (to me) Perls most power features. But what really makes Perl shine is CPAN. In there, you have a huge collection of tools, fairly well catalogued and searchable. A central repository with a massive user base, which means it's well tested (at least, those modules that I can figure what to do with. Quantum::Superpositions is cool, but damned if I know what do to with it...), and generally well supported. In addition, a large number of the modules are written by people who've developed quire respectable names. For instance, if you find a module by Damian, you can pretty much take it to the bank that's going to work. I still maintain that a large portion of Perls success is based on CPAN. Many C and C++ libraries exist to perform similiar functions, but nowhere have I found an archive that's as readily as accessible and comprehensive. Many people get involved in Perl without realizing that CPAN exists. They decide they want to do some dynamic web pages, and Perl is a natural. Or they pick up code from someone else for some purpose that requires a CPAN module. I don't think many people say "I'm going to do some heavyweight multi-body orbital calculations, I think I'll use Perl." But once people start making use of the langauge, they start finding other applications for it (although this phenomenom is not limited to Perl. Java and Forth heads do the same thing). Partly because they discover they enjoy the language (by the way, there *are* people out there that don't like Perl. I personally know such one. She doesn't like 'C', though, so she's just a lost cause...), partly the development cycle in Perl can be quicker than other langauges, and a lot because they discover that a great amount of the underlying grunt work (CGI.pm always springs to mind) is already written. There are a couple of other reasons for Perls success. Accessibility, timing, and ease of adding modules. The tools for Perl itself are easy to obtain. It was easier for me to figure out what version of Perl I needed than what files I need to get glibc-6 (or is it 2.2? Or is the compat libs for 6 in 2.2? I remember it was something completely unintuitive). Timing because the programming community was ready to accept something like Perl, and Linux was coming along, and they complimented each other. And module addition. I don't use the CPAN shell, but do it the old fashioned way. And I know that it's always going to take 4 commands to install a module. VERY consistent. Don't have to read a poorly written readme, and run ./configure, then play "guess what the author really meant". These are my views why Perl is as popular as Perl is. --Chris | [reply] |
by marvell (Pilgrim) on Dec 01, 2000 at 20:08 UTC | |
-- Brother Marvell | [reply] |
Re: What is it about perl that makes perl so cool?
by mirod (Canon) on Dec 01, 2000 at 17:12 UTC | |
Of course Perl is cool because it is powerful. It lets you focus on the important part of a program, the algorithms, instead of spending time making sure that you don't mess-up you pointer arithmetic or your buffer handling or creating classes for every darn structure you need. But I think that above all Perl is cool because it is complex. I like learning new idioms in Perl just as much as I like learning new idiomatic expressions in English. It keeps me interested in the language itself. It took me 2 years to feel confident enough to use map in production code, I still haven't used pack much... there is just so much in the language, without even getting into Wizard territory, that I feel I can keep learning for a good number of years. Which is what I like! Learning and feeling that I am improving with time. And when I get bored I know there will still be undocumented features, glob mongering and the likes to keep me busy for ever... | [reply] |
Perl...Cool?
by frankus (Priest) on Dec 01, 2000 at 15:22 UTC | |
Perl makes the everyday things easy and the hard things possible.That's my catch phrase (major tongue in cheek ;0) and you'd better not steal it! --Brother Frankus. | [reply] |
(Blue) Re: What is it about perl that makes perl so cool?
by Blue (Hermit) on Dec 01, 2000 at 20:13 UTC | |
Reading this list, seeing people talk about CPAN, I was tempted to talk about the community of Perl and how gosh darn cool it was. but then I realized that if I was stuck on a desert isle with no connection to the world, no CPAN, no PerlMonks, no web pages, Perl would STILL be a cool language. Back to my original point. Traditionally, 'powerful' languages had a steep learning curve even to do the basics and were rather unforgiving. I think we can all agree that this doesn't fit Perl. On the other hand, traditionally easy to pickup and program languages lacked power and growth. Look at that LOGO turtle go! I think we can all agree that this also does not describe Perl. I picked up Perl, and immediately felt welcomed into it. It made it fun to program. Yet several years into it I can *still* learn a new thing a day. Not just 'a new thing', but 'a new thing A DAY'. Think about the limitless possibilities of Perl. To put it another way, the leading edge and the training edge of 'the Perl experience' enclose such a large area. It's a joy to get into (the close leading edge), yet you do not 'outgrow' it. Perl is easy to learn not because it's underpowered or dumbed down, but because it's smart enough to do 'the right thing' as well as having a forgiving syntax, more then one way to do something, copious error checking and messages, etc. And the entire idea of modules (ok, CPAN does work it's way back in) means that when you take Perl far, even there are building blocks that keep coding a joy of creation instead of a chore of worrying the details to death. That's the number one reason I prefer Perl.
=Blue | [reply] |
by jcwren (Prior) on Dec 01, 2000 at 20:57 UTC | |
Reading this list, seeing people talk about CPAN, I was tempted to talk about the community of Perl and how gosh darn cool it was. but then I realized that if I was stuck on a desert isle with no connection to the world, no CPAN, no PerlMonks, no web pages, Perl would STILL be a cool language. I'm not sure I agree with this. Well, depending on what resources you have on your island. Do you have the source? Do you have perldoc? Let's say you don't have the source for Perl, nor perldoc (obviously not a real *nix system running here...). Can you remember all the keywords and constructs? With C, you have 27 or 32 key words. With C++ it's a few more. With average (modern) BASICs, it's like 100+. Java I can't remember. Now, with C, you could feasibily remember your 27 keywords. And anything you need can be built on those 27 keywords (by the way, Forth is probably the best at this paradigm!). While you could definitely still write useful software in Perl with the basic knowledge, you couldn't fully exploit it. Now, if you happen to have the ORA CD Bookshelf, then it's a whole different story. And perhaps this spawns a thread in itself. How often do you refer to the documention? I use certain features of the langauge infrequently, and when I don't use them, I either have to look them up, or hack at it to get it right. I sling LoLs of LoLs about with impunity, but am pretty weak with regexs. I have virtually no experience with autoloaders, but am comfortable with writing packages. I don't do sophisticated OO, but dont' always take the shorted path to getting somewhere. My excuse is I don't use Perl 100% of the time (I do a lot of embedded C and assembly). What would you (the reader, not just Blue) consider your strengths and weaknesses in Perl? Will you attempt to improve the areas you're weak in, or wait until you need to do something with that feature? --Chris | [reply] |
by marvell (Pilgrim) on Dec 01, 2000 at 21:04 UTC | |
I have to disagree, there are so many ways of skinning a cat with perl, it is not always a disaster to forget the syantax of a keyword. How many map calls could be replaced with for and push? I imagine all of them. However, you are quite right, it would be impossible to "fully exploit" the language. But do any of us do that now, with all the docs to hand? -- Brother Marvell | [reply] |
by marvell (Pilgrim) on Dec 01, 2000 at 21:08 UTC | |
In answer to you question on the use of documentation ... I tend to grab for the Perl 5 Pocket Reference quite often. Sometimes I find myslef searching in perlfunc. Perl in a Nutshell get it's uses as does the Perl Cookbook. Even less ... Advanced Perl Programming helps me with LoL type problems. I don't find I need those advanced techniques all that often. -- Brother Marvell | [reply] |
by tilly (Archbishop) on Dec 02, 2000 at 12:18 UTC | |
Re: What is it about perl that makes perl so cool?
by marvell (Pilgrim) on Dec 01, 2000 at 17:32 UTC | |
To me, weakly type languages offer the opportunity to "get the job done". In the Java world as with many other strongly typed languages, design is a very important aspect of the development process, this can often dampen the enthusiasm. Maybe it's because the type of problems you can solve in perl give instant gratification. Maybe it's because perl is ideal for solving small problems (as well as large ones). I don't think I'd get java out if I wanted a quick stat of an Apache log file. Ponder ... ponder ... -- Brother Marvell | [reply] |
Re: What is it about perl that makes perl so cool?
by coreolyn (Parson) on Dec 01, 2000 at 19:17 UTC | |
I think Larry's Perl 5 Overview shows best what makes perl so cool. In particultar this slide. I often wonder if Larry had any idea that somewhere between Manlpulexlty and Whipuptitude he created a magnet for minds that see beyond the limits established by the industry and that enjoy coding in the realm of what could be. Then it hits me, Of course he did! That's what made creating perl fun for him. -- That's OO perl, NOT uh-oh perl !-) | [reply] |
Re: What is it about perl that makes perl so cool?
by jeroenes (Priest) on Dec 01, 2000 at 19:17 UTC | |
To reason the other way around, what are the most powerful features of perl? For me, I'm using perl mostly for data analysis (read: messing around with textfiles), the regex comes first. Second is, being able to write a lot of powerful things without assigning anything to a variable. I think it is a very cool thing to code using only one variable, the variable you need! Compare that with the total number of variables you would need in C or Java to, for example, count the total number of lowcase characters in a file. Jeroen
* Hmm. I should look that word up in a dictionary,
no ***** idea what the actual meaning is.
| [reply] |
Re: What is it about perl that makes perl so cool?
by Anonymous Monk on Dec 02, 2000 at 06:18 UTC | |
Perl, on the other hand, is so complex and subtle that to truly understand how the language works, you have to study a book like <cite>Advanced Perl Programming</cite>. How many Perl programmers actually reach that level? Learning Perl is a lot like growing up. As you get more and more sophisticated, the grown-ups give you more and more complicated explanations of how the world works. You can imagine plotting every language as a point in a quarter-plane, where the x-axis indicates how difficult it is to understand the language, and the y-axis indicates how productive you can be without understanding it. (You have to imagine a different graph for every meaning of the word "understand.") Perl would be very, very far from the origin, and C would be very close to the origin. My current understanding of Perl is filled with holes, comforting lies fed me by the Perl grown-ups, and things that I've simply made up -- yet I can write complex programs from scratch. This would not be possible in any other language that I've seen. It also explains why I'm writing big, useful, complex programs in Perl and at the same time feeling like a complete beginner. In Perl, I haven't yet gotten past the feeling that at any time my code might wander into the dark area where my current understanding will deceive me. Judging by my productivity, though, rather than by my gut feeling, Perl wins for ease-of-learning by a mile. That's the bottom line. | [reply] |
Re: What is it about perl that makes perl so cool?
by iamnothing (Friar) on Dec 02, 2000 at 01:25 UTC | |
Usually when I've had to ask questions on Perl in the past, I could find the answers relatively quickly, often on sites like this, where there are several replies documenting different methods to accomplish the problem at hand. Before I even asked the question. Now that I'm attempting a code conversion for our Win32 systems from a specialized language (WinBatch), I'm going to be faced with a million new challenges that haven't been answered yet. But I'm at least confident that many of them will be answered much faster than if I used C/C++. And without the hype. The other thing I love about Perl is the flexibility of the language. I can sit down and prototype the functionality quickly and make it work. Python is the only other language that I can do that with easily, and for a good portion of what I do, it's still overkill. Java, C, and C++ fall prey to a few more cycles in development for me, even though I've been using them longer (which could be part of my problem). So, the community, and the flexibility. That's why I think Perl is cool... | [reply] |
by mothra (Hermit) on Dec 02, 2000 at 04:11 UTC | |
I may be restating what other people have said here, but hey, you asked :) My reasons for loving Perl are as follows: | [reply] |
Re: What is it about perl that makes perl so cool?
by elusion (Curate) on Dec 02, 2000 at 22:29 UTC | |
TMTOWTDI - There's More Than One Way To Do It. - p u n k k i d | [reply] |
Re: What is it about perl that makes perl so cool?
by Anonymous Monk on Dec 04, 2000 at 01:31 UTC | |
| [reply] |
Re: What is it about perl that makes perl so cool?
by OzzyOsbourne (Chaplain) on Dec 06, 2000 at 18:28 UTC | |
| [reply] |
Re: What is it about perl that makes perl so cool?
by BlueLines (Hermit) on Dec 03, 2000 at 08:20 UTC | |
1) try / catch I'm not the most experienced java programmer (a year or so while i was at school), but i really disliked having to check for errors from a method with two separate blocks of code. I disliked even more the fact that you had to know the specific exception that each method would throew. In java: While you sometimes have to do this in perl (eval and check for $@), usually you can get away with something like this:
2) my.method.name.is.so.extremely.long.that.i.get.a.headache.reading.the.code.that.i.wrote. 'Nuff said. Things i did like: 1) The easy learning curve . Java is not a difficult language to learn. Everything pretty much conforms to some basic standards, so once you get used to the way things work, you don't have to kick yourself trying to remember obscure things like whether or not you want the scalar or array return or whether or not $< or $> is what you're after. Java + Java Beans also make it simple (in comparison to everything except VB) to generate decent GUI apps, even for someone without much experience in such things. 2) Java is a true OO language . As much as I love perl, i would never recommend it to someone as a first language. While it is indeed possible to do truly OO coding with perl, perl lends itself more to linear tasks. And if you're suddenly forced to start working in an OO environment, your screwed if all of your previous coding experience was in BASIC, C, and perl (i can vouch for this personally). Don't get me wrong; I'm not bashing perl. The company i work for does 95% of it's coding in perl, and the speed that one can churn out good working code is amazing compared to any language. Alot of our employees have had no previous programming experience at all, and most have become competent programmers in a few months. I believe the same would hold true if we were working in java exclusively, although I would have never started if that was the case, since good java development environment != linux or freebsd. Anyhoo, sorry for the ramble. BlueLines Disclaimer: This post may contain inaccurate information, be habit forming, cause atomic warfare between peaceful countries, speed up male pattern baldness, interfere with your cable reception, exile you from certain third world countries, ruin your marriage, and generally spoil your day. No batteries included, no strings attached, your mileage may vary. | [reply] [d/l] [select] |
by merlyn (Sage) on Dec 03, 2000 at 13:42 UTC | |
Java is a true OO languageJava is no more a true "OO" language than C++ or Perl. It's a hybrid language, requiring one set of methodologies when you are working with objects, and another set when you are working with "primitives". For a true OO language, look at Smalltalk, Eiffel, Scheme, or (dare I say) Ruby. | [reply] |
by zigster (Hermit) on Dec 04, 2000 at 21:17 UTC | |
What exactly is an OO language?? What, for that matter, is OO? You cant have a 'true' OO language because OO is a programmers or designers construction. A programming language can at best support OO constructs, however such support is NOT required for OO programming. I have written 'true' OO C, now it is clear that C has no OO support within it. I have however implemented polymorphism (of sorts) inheritence (of sorts). I have also (hangs head in shame) written java with a single object and a whole pile of static methods, I was in a a hurry OK! ;-) ). A language is a not OO a program is. Perl has the capabilities to support OO programming ideas, it itself is neither OO nor not OO. I consider myself a good programmer, I like the OO principles. When writting perl I use OO designs.. exactly the same as when I write java. WORD!
| [reply] |
by jeffa (Bishop) on Dec 04, 2000 at 21:31 UTC | |
by merlyn (Sage) on Dec 04, 2000 at 21:23 UTC | |
by zigster (Hermit) on Dec 04, 2000 at 21:32 UTC | |
| |
by Anonymous Monk on Dec 06, 2000 at 10:18 UTC | |
by Tyke (Pilgrim) on Dec 05, 2000 at 20:33 UTC | |
by BlueLines (Hermit) on Dec 06, 2000 at 02:25 UTC | |
Java is a language that from the beginning has implemented OO principles. Java's structure also lends itself more towards doing things in an OO-manner. Perl began as a procedural language. It has evolved to the point that it is possible to only write OO code in it, but at the same time, the procedural roots show. Not that this is a bad thing. I would hate to be required to invoke several methods on new objects in a script when i only wished to search and replace through a flat file. I didn't mean to start a fscking war in this thread; I just found it odd that every post under this thread worshipped perl as the "One True Language". And while perl is my preferred language, there are things that i'd like to see change (and i'm not the only one). Java has it's advantages, and it seemed to me that the original posting was asking what made perl so much cooler in comparison to java. I just wanted to point out that perl doesn't beat out java in every area, and to try to stimulate discussion . I mean, how interesting is it to read 20 threads that say "perl/cpan/cgi.pm/regexes are so cool/" ? We already knew that, or else we wouldn't be here...... BlueLines Disclaimer: This post may contain inaccurate information, be habit forming, cause atomic warfare between peaceful countries, speed up male pattern baldness, interfere with your cable reception, exile you from certain third world countries, ruin your marriage, and generally spoil your day. No batteries included, no strings attached, your mileage may vary. | [reply] |
by buzzcutbuddha (Chaplain) on Dec 11, 2000 at 17:12 UTC | |
>while i was at school), but i really disliked having to >check for errors from a method with two separate blocks of >code. I disliked even more the fact that you had to know >the specific exception that each method would throw. Actually I believe that the Java exception handling is quite elegant. As a developer, you should already have an idea of where your errors might occur (hence Perl's DIE, which you place after where you think a problem will occur), and what type they will be (you expect to get an int and the user inputs a double brings about a ParseException) and so writing Try/Catch statements makes sense. It localizes the error handling to the code that is most likely to bomb out. Just my $0.02 | [reply] |
Re: What is it about perl that makes perl so cool?
by Anonymous Monk on Dec 10, 2000 at 00:32 UTC | |
| [reply] |
by Elgon (Curate) on Dec 10, 2000 at 22:18 UTC | |
On the other hand I can spell 'genius'. Elgon | [reply] |
by Elgon (Curate) on Dec 10, 2000 at 22:16 UTC | |
You are indeed right. I humbly beg forgiveness. I shall write 1000 lines of COBOL as penance. Elgon | [reply] |