The link below describes two uses for anonymous methods. http://stackoverflow.com/questions/7818759/delphi-anonymus-methods-pro-and-cons-good-practices-when-using-closuresanony/7821882#comment9576663_7821882
I don't entirely subscribe to the (1) one, it seems to be mostly a shorthand argument. But (2) is somewhat logical and interesting. an. funcs allow to wrap a call to a procedure together with its arguments inside a anonymous function (closure-like) and queue that in a different thread and have it executed there by RTL code. I think that (2) is the main reason for anonymous functions, and people shouldn't assume that the use of an. funcs is the same as in functional languages. (IOW for expressions) _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal