Right now a closure is a function pointer and another pointer to store any 
possible captures. This implies that the closure must be used within another 
function context.

Let's say you have a function that operates on a type in an object oriented 
manner.
    
    
    proc MyMethod(this: var MyObject, a: int, b: string)
    
    
    Run

In this case the function is not inside another one. However, if we could reuse 
the context pointer in the closure to become the pointer to the "class", 
MyObject in the example above. Is there any way you can hack the closure to 
support this? Also how would you then call the closure with arbitrary object 
type?

Reply via email to