Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

(jcwren) Re: What is it about perl that makes perl so cool?

by jcwren (Prior)
on Dec 01, 2000 at 20:57 UTC ( [id://44399]=note: print w/replies, xml ) Need Help??


in reply to (Blue) Re: What is it about perl that makes perl so cool?
in thread What is it about perl that makes perl so cool?

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

e-mail jcwren
  • Comment on (jcwren) Re: What is it about perl that makes perl so cool?

Replies are listed 'Best First'.
Re: Re: (Blue) Re: What is it about perl that makes perl so cool?
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

The use of documentation.
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

      Advanced techniques?

      I use them all of the time, and the trick is that they are not very hard (at least not in Perl). For instance a hash of hashes? That is just a directory structure:

      # Name it absolutely $foo{some}{path}{to}{the}{thing}{I}{want} = "something"; # Or relatively: my $h_ref = $foo{some}{path}; foreach my $thing (keys %$h_ref) { print "Found key '$thing' with value $h_ref->{$thing}\n"; }
      It is just an odd delimiter. *shrug*

      For the next trick look at map and grep and the general list-oriented nature of Perl and see it as a Unix pipeline written (unfortunately) right to left instead of left to right. Now stare at the Schwartzian sort and see why it is so natural.

      In no time these "advanced" techniques will feel like part and parcel of how things work... :-)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://44399]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (4)
As of 2024-04-25 15:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found