From: Pit Capitain Date: 2001-11-01T05:17:21+09:00 Subject: [ruby-talk:24029] Re: RCR #50 Simplifying the use of map by adding optional parameter Hi Robert, Matz is right, it's been too early for me. I'm still reading my way through more than 400 Ruby mails, and I don't want to miss one, so it took me longer to reply to your RCR. I often wanted the sugar you requested, too. On rubygarden I proposed a slightly different syntax though. Another construct I often come up with are short methods that only do one thing (like for example traversing a collection), delegating the remaining work to other methods of the same class, like in def process_files( *filenames ) # traverse filenames filenames.each( &method( :process_file ) ) end def process_file( filename ) # redirect $stdin with_redirected_stdin( filename, &method( :process_stdin ) ) end def process_stdin # read $stdin process_lines( $stdin.readlines ) end and so on. So I often wanted to get rid of the "method()" call and instead write something like &:name, which would pass the named method as a block parameter. But this collides with the syntax I proposed for your RCR, and I would rather like the RCR being approved. Regards, Pit On 27 Oct 2001, at 12:27, Yukihiro Matsumoto wrote: > Hi, > > In message "[ruby-talk:23556] Re: RCR #50 Simplifying the use of map > by adding optional parameter" > on 01/10/27, Robert Feldt writes: > > |I thought more people felt like this but apparently not. Must be my > |Haskell heritage. > > It's too early to say "apparently not". I'd like to hear from others > too. > > matz.