Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

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

by mpeg4codec (Pilgrim)
on Dec 13, 2007 at 19:00 UTC ( #656881=note: print w/ replies, xml ) Need Help??


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

I will definitely second this, I had to learn Lisp (for AI) and Scheme and OCaml (for programming languages) last year at uni. While all three have constructs for iterative loops (for example), my professors wouldn't allow us to use them, forcing us to think in terms of recursive calls. Just this simple rule alone allowed me to think more ``functionally'', and soon I was thinking in terms of recursive algorithms, higher order functions, and so forth. This bled over to my Perl hacking, and my code has never been less C-like.

I was stuck in the rut of the C way of doing things, but functional languages showed me the light. I'd recommend anyone take a short vacation away from imperative languages if they haven't yet.


Comment on Re^2: 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
Node Status?
node history
Node Type: note [id://656881]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (9)
As of 2014-07-25 07:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (169 votes), past polls