[fpc-pascal] TThread.Queue vs TThread.Synchronize

Mattias Gaertner nc-gaertnma at netcologne.de
Tue Feb 24 11:32:29 CET 2015

On Tue, 24 Feb 2015 11:23:41 +0100
Michael Schnell <mschnell at lumino.de> wrote:

> On 02/24/2015 11:12 AM, Sven Barth wrote:
> >
> >
> > AFAIK Delphi doesn't use the term "closures" though conceptually 
> > anonymous functions (as implemented by Delphi) are one way to achieve 
> > them.
> >
> What is the advantage of using a "closure" and/or an "anonymous 
> function" instead of just doing "free;" as the last instruction of a 
> normal procedure of some object ?

The advantage of anonymous is less typing, disadvantage is easy
misuse, for example adding redundancy and harder to debug.

About closures see for example:


More information about the fpc-pascal mailing list