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 so that a language which doesn't know about blocks can still call Ruby code.

On the Cardinal mailing list Dan Sugalski mentioned the possibility of having a special block parameter. For Ruby use this would be perfect.

The downside is that AFAICT it'd only be used by Ruby code. I'm not sure it's a good idea to modify the calling conventions for the benefit of just one user language.

--
Mark Sparshatt



Reply via email to