Beefy Boxes and Bandwidth Generously Provided by pair Networks Bob
Just another Perl shrine
 
PerlMonks  

Re: When would you choose foreach instead of map?

by techra (Pilgrim)
on May 21, 2004 at 13:29 UTC ( [id://355365]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to When would you choose foreach instead of map?

I just simply don't like map. It has its uses at its times, but for the most part I like my code to be modifiable and debuggable at every instant or iteration. Map compresses the process down way too much for my liking.

There are those perl programmers who try to do as much with as little as possible and then are those of us who like the code to be as readable and mutable as possible.

  • Comment on Re: When would you choose foreach instead of map?

Replies are listed 'Best First'.
Re: Re: When would you choose foreach instead of map?
by rjray (Chaplain) on May 21, 2004 at 20:21 UTC
    There are those perl programmers who try to do as much with as little as possible and then are those of us who like the code to be as readable and mutable as possible.

    I repeat an earlier statement of mine, that not understanding that part of the language does not make it less useful, effective, or in this case, readable. I use map when it is the right choice, and my code is both readable and debuggable.

    --rjray

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://355365]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.