[MacRuby-devel] [MacRuby] #712: Feature Request: Add Support for C-Level Blocks

MacRuby ruby-noreply at macosforge.org
Thu May 13 10:47:47 PDT 2010


#712: Feature Request: Add Support for C-Level Blocks
-------------------------------+--------------------------------------------
 Reporter:  cwdinfo@…          |       Owner:  lsansonetti@…        
     Type:  enhancement        |      Status:  new                  
 Priority:  blocker            |   Milestone:  MacRuby 0.7          
Component:  MacRuby            |    Keywords:  block                
-------------------------------+--------------------------------------------

Comment(by martinlagardette@…):

 I would say the 2nd and 3rd form wouldn't be good to implement.

 The 3rd one because, well, some parts are missing (the
 `completionHandler:` part). The second one because this looks more like a
 callback, rather than a Proc/lambda, and would have unexpected behavior
 from a ruby point of view. In fact, Ruby-wise, it would be expected that
 "handler" is called and its result is passed to completion handler.

 Otherwise, I agree 100% for the first form :-). I wanted to do it when
 implementing the Proc as callback functions, but we had no C-block
 supports at the time. I hope we can bring them to life (since a C-block is
 not that far from a ruby-block, at least in principle).

-- 
Ticket URL: <http://www.macruby.org/trac/ticket/712#comment:1>
MacRuby <http://macruby.org/>



More information about the MacRuby-devel mailing list