From: Austin Ziegler Date: 2004-08-05T22:27:10+09:00 Subject: Re: Macros in Ruby On Thu, 5 Aug 2004 13:24:16 +0900, Jim Weirich wrote: > Actually what surprises me most about Ruby's one-block per method > technique is how flexible it turns out to be. One would think that > having the ability to pass multiple blocks would be big improvement, but > I suspect that the improvement in flexibility is merely incremental. > > What surprises me about Ruby is the about of expressiveness you get, > even though you are limited to only one block per method call. You > would think that having the ability to pass multiple closures to a > method would be a big improvement, When I ported Diff::LCS, the Perl Algorithm::Diff version from which I started used a hash of anonymous procs. I modified this to use a callback *object*. I think that by the time you start needing multiple procs, it's just as easy (or easier) to require an object that encapsulates that. -austin -- Austin Ziegler * halostatue@gmail.com * Alternate: austin@halostatue.ca