in reply to Re^3: Map Vs Foreach
in thread Map Vs Foreach
map{} is a wrong idea if the output isn't being used.Why? We use functions and operators without using their output all the time (print for instance). What makes map special that's not using its return value is a sin?
I didn't know about that. When did this performance enhancement happen?6 years ago (5.8.1). After many years of people using the performance penalty of map-in-void-context as an argument not to use map in void context, someone actually produced a one line patch to eliminate that. Didn't stop people from ranting against using map-in-void-context though. Didn't even stop people using the performance argument either.
Besides, wasn't it Larry himself who said that using things in other ways than originally intended isn't bad in itself? That one can enjoy sex, even if you aren't using it to reproduce yourself?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Map Vs Foreach
by JavaFan (Canon) on Nov 27, 2009 at 12:34 UTC | |
|
Re^5: Map Vs Foreach
by Jenda (Abbot) on Dec 01, 2009 at 17:06 UTC |