Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: How do I train myself to write more Perl-ish Perl, rather than C-ish Perl?

by dragonchild (Archbishop)
on Dec 13, 2007 at 16:22 UTC ( [id://656852]=note: print w/replies, xml ) Need Help??


in reply to How do I train myself to write more Perl-ish Perl, rather than C-ish Perl?

Most of the differences between C-ish and Perl-ish is the functional stuff that Perl provides (borrowed from Lisp/Scheme/Haskell/etc). So, learn how to use map, grep, and sub. Patterns to look at are closures, dispatch tables, and function generators. Start thinking of your data in terms of infinite lists that get transformed via a set of completely independent side-effect-free transforms.

This isn't appropriate for everything, but it's good to know. For one thing, it makes Javascript look like a really nice language. I like Javascript - I just don't like its environments.


My criteria for good software:
  1. Does it work?
  2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?
  • Comment on Re: How do I train myself to write more Perl-ish Perl, rather than C-ish Perl?

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (6)
As of 2024-04-23 13:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found