Just curious, why did EMBT make "procedure of object" type to be incompatible with "reference to procedure"? It is easy to figure out that TMethod is a simple implementation of closure (it stores "Self" value inside and a pointer to procedure that can be called). "Reference to procedure" does the same but in more general way.

Just curious, why did EMBT make "procedure of object" type to be incompatible with "reference to procedure"? It is easy to figure out that TMethod is a simple implementation of closure (it stores "Self" value inside and a pointer to procedure that can be called). "Reference to procedure" does the same but in more general way.

The second question is... why did they make "procedure" type to be incompatible with "reference to procedure", so I have no chance to pass a closure expression to a method that accepts a regular function... But... who cares.

Comments