in reply to Re: map in void context
in thread map in void context
I think of map as returning a list, and if you're discarding the list, I wonder if there's something wrong. I think, "why didn't the programmer just use for?"But that shows more about you than about the programmer. Nothing in void context (or even non-void scalar context) returns a list.
And the efficiency bug that made map construct a list internally was solved many years ago. As for more than one way to make a list, the programmer doesn't just have the option between map and for, there's also while, until, goto and bare blocks. And C-style for. I never think seeing one loop "Hmm, the programmer didn't use any of the other 6 types of loops, I wonder what's wrong". That only hinders my ability to understand the code.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: map in void context
by kyle (Abbot) on Dec 17, 2008 at 16:05 UTC | |
by JavaFan (Canon) on Dec 17, 2008 at 16:29 UTC | |
by gwadej (Chaplain) on Dec 17, 2008 at 18:46 UTC |