in reply to Re^2: map vs for\foreach.
in thread map vs for\foreach.
It isn't wrong, it is just not saying what you mean. map is a transformation. for is a loop. If I use map, it is understood that there are to be no modifications to the original data set (and conversely, if there are side effects, I did it wrong). If I use for, then there is the potential for modification of the original data.
It is, for me, about clarity of intent. That is why I insist (in my code) on this usage.
--MidLifeXis
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: map vs for\foreach.
by LanX (Saint) on Mar 13, 2015 at 18:56 UTC | |
|
Re^4: map vs for\foreach.
by karlgoethebier (Abbot) on Mar 13, 2015 at 18:23 UTC | |
by MidLifeXis (Monsignor) on Mar 13, 2015 at 18:27 UTC | |
by LanX (Saint) on Mar 13, 2015 at 18:44 UTC |