In Delphi 2009, Embarcadero added  the anonymous method to the Delphi language.

How is it implemented?

Internally, it is implemented as an interface which implements a single method, Invoke.

So if you have IX declared as reference to procedure, then IX is technically equivalent to the following:

1
2
3
IX = interface
  procedure Invoke;
end;

And if you have IX declared as reference to function: Integer, you would have IX being technically equivalent to:

1
2
3
IX = interface
  function Invoke: Integer;
end;

With IX being declared as reference to procedure, let's declare a class, TX:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
TX = class(TInterfacedObject, IX)
public
  procedure Invoke;
end;
 
procedure TX.Invoke;
begin
  WriteLn('Hello World');
end;
var
  LX: TX;
  AX: IX;
begin
  LX := TX.Create;
  AX := LX;
  AX;
end.
So,  what I've discovered is that though in Delphi XE2 you can assign LX to AX (since TX is declared as implementing IX, and AX is declared as IX), you cannot assign TX.Create to AX.