On 02/24/2015 11:32 AM, Mattias Gaertner wrote:
About closures see for example:
https://en.wikipedia.org/wiki/Closure_%28computer_programming%29

Hence the "pure" closure paradigm does not need object-orientation.

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.

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.

(In that light "TThread" is a closure-Type object, as with "FreeOnTerminate = True" "Execute" is a kind of closure. :-) )

-Michael
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to