[fpc-devel] Delphi anonymous methods

Boian Mitov mitov at mitov.com
Mon Mar 4 23:36:00 CET 2013


Cool :-).
BTW: When you implement it, please consider making it available for attributes!
The Delphi version really sucks in this :-( .
I have not been able to do things like:

[TComponentDialog( 
    procedure( AInstance : TComponent)
    begin
       TMyComponnt( AInstance ).ShowDialog();
    end
]
TMyComponnt = class( TComponent )
public
  procedure ShowDialog();
end;

This could have eliminated a full source file, and replaced it with 3 lines :-( . I really hate the half baked attribute and anonymous methods in Delphi :-( .

With best regards,
Boian Mitov

-------------------------------------------------------
Mitov Software
www.mitov.com
-------------------------------------------------------


From: Sven Barth 
Sent: Monday, March 04, 2013 2:19 PM
To: fpc-devel at lists.freepascal.org 
Subject: Re: [fpc-devel] Delphi anonymous methods

We'll implement features of Delphi anyway for compatibility. So why not use the implementation of it, provide some nice Pascal-style syntax for it and allow FPC users to usr the feature in non-Delphi modes as well. :)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20130304/6c0e3866/attachment.html>


More information about the fpc-devel mailing list