in reply to Re: Think for yourself.
in thread is the use of map in a void context deprecated ?
The main reason I tend to use map is to signal to the reader of the code that this is an operation on a list not just on a set of values that are conveniently represented as an array.
In other words, to me, map and grep carry extra semantic value to future maintainers of the code. (In most cases, Wade-future does not really remember what Wade-past had in mind.<grin/>)
To me, your first example implies that we are transforming a list. The second implies we are transforming the elements of a list. Although the results are the same to the computer, to the programmer the meaning may be very different.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Re: Think for yourself.
by tilly (Archbishop) on Oct 06, 2003 at 03:37 UTC | |
by thelenm (Vicar) on Oct 06, 2003 at 16:37 UTC | |
by gwadej (Chaplain) on Oct 30, 2003 at 05:36 UTC | |
by gwadej (Chaplain) on Oct 30, 2003 at 06:02 UTC | |
by tilly (Archbishop) on Oct 30, 2003 at 15:49 UTC | |
by gwadej (Chaplain) on Nov 04, 2003 at 03:52 UTC | |
by tilly (Archbishop) on Nov 04, 2003 at 06:24 UTC | |
by BrowserUk (Patriarch) on Oct 30, 2003 at 20:15 UTC | |
by tilly (Archbishop) on Oct 30, 2003 at 22:01 UTC | |
|