Re: Handling block parameters in Ruby

2004-08-14 Thread mark sparshatt
Larry Wall wrote: On Fri, Aug 13, 2004 at 02:12:06PM +0100, mark sparshatt wrote: : My main worry with this approach is how it would interact with slurpy : args. I mean if method is defined as : : def method(*args) : ... : end : : how do I make sure that $clos doesn't become part of args? In Pe

Re: Handling block parameters in Ruby

2004-08-13 Thread Brent 'Dax' Royal-Gordon
On Fri, 13 Aug 2004 11:44:28 -0400, Dan Sugalski <[EMAIL PROTECTED]> wrote: > Still, I think it might be worth dedicating a slot to it. It's a > handy feature, and if we open it up to perl & python I'd bet we'd see > them using it. This makes we wonder if we shouldn't generalize the concept of the

Re: Handling block parameters in Ruby

2004-08-13 Thread Larry Wall
On Fri, Aug 13, 2004 at 02:12:06PM +0100, mark sparshatt wrote: : My main worry with this approach is how it would interact with slurpy : args. I mean if method is defined as : : def method(*args) : ... : end : : how do I make sure that $clos doesn't become part of args? In Perl 6 circles we've

Re: Handling block parameters in Ruby

2004-08-13 Thread Dan Sugalski
At 1:00 PM +0200 8/13/04, Leopold Toetsch wrote: mark sparshatt wrote: I'd like advice on how to handle method invocations that include special block parameters such as method() {do something} The idea is to turn the block into a closure pmc. The problem is how to pass this to the method, so tha

Re: Handling block parameters in Ruby

2004-08-13 Thread mark sparshatt
Leopold Toetsch wrote: mark sparshatt wrote: I'd like advice on how to handle method invocations that include special block parameters such as method() {do something} The idea is to turn the block into a closure pmc. The problem is how to pass this to the method, so that it knows that it's a spe

Re: Handling block parameters in Ruby

2004-08-13 Thread Leopold Toetsch
mark sparshatt wrote: I'd like advice on how to handle method invocations that include special block parameters such as method() {do something} The idea is to turn the block into a closure pmc. The problem is how to pass this to the method, so that it knows that it's a special block parameter.

Handling block parameters in Ruby

2004-08-13 Thread mark sparshatt
I'd like advice on how to handle method invocations that include special block parameters such as method() {do something} The idea is to turn the block into a closure pmc. The problem is how to pass this to the method, so that it knows that it's a special block parameter. Particularly in a way