<p>Am 24.02.2015 14:41 schrieb "Michael Schnell" <<a href="mailto:mschnell@lumino.de">mschnell@lumino.de</a>>:<br>
><br>
> On 02/24/2015 11:32 AM, Mattias Gaertner wrote:<br>
>><br>
>> About closures see for example:<br>
>> <a href="https://en.wikipedia.org/wiki/Closure_%28computer_programming%29">https://en.wikipedia.org/wiki/Closure_%28computer_programming%29</a><br>
>><br>
> Hence the "pure" closure paradigm does not need object-orientation.<br>
><br>
> For my feeling it is prone to introduce some contradiction to object-orientation and maybe such a paradigm seems not very appropriate in an object language.<br>
><br>
> Maybe a definition of a closure/anonymous-like construct with respect to objects might be invented, that auto-creates an instance of some object-type that inherits a "Closure" (or "Execute") procedure that automatically performs a free when returning.</p>
<p>Internally Closures are implemented as a class implementing an interface that provides an Invoke method.</p>
<p>Also Object Pascal is not a pure object oriented language so I'm definitely not against non-OOP constructs. Keep also in kind though that languages like C# also have such constructs.</p>
<p>Regards,<br>
Sven</p>