[fpc-devel] Delphi anonymous methods

Graeme Geldenhuys graeme at geldenhuys.co.uk
Mon Mar 4 11:07:53 CET 2013


On 2013-03-04 03:59, Alexander Klenin wrote:
> 
> Because computer science is advancing, and there is a limit after which
> programming language can not ignore those advancements and stay relevant.

Sure, I understand that. I just haven't seen an example that explains
why it is needed. Kind of why I am asking about this now.

Method pointers, which already exist for a long time, seem to allow the
same thing (passing methods to other functions etc), and they at least
have the benefit that the method is named (hint to the developer what it
does), and that it is defined and implemented in a more sane location in
the unit.

Was the anonymous method concept implemented in other languages, because
they didn't have the method pointer concept that Object Pascal has? If
so, does Object Pascal really need another method pointer type
implementation?


Regards,
  - Graeme -

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/




More information about the fpc-devel mailing list