Anonymous procedures (Was: Re: [fpc-devel] for-in-index loop)

Alexander Klenin klenin at gmail.com
Sat Jan 26 20:18:17 CET 2013


On Sun, Jan 27, 2013 at 3:51 AM, Marco van de Voort <marcov at stack.nl> wrote:
> In our previous episode, Alexander Klenin said:
>> >
>> > Please take a look at this:
>> > http://blog.barrkel.com/2010/01/using-anonymous-methods-in-method.html
>>
>> While this article confirms my understainding of them Delphi implementation,
>> it does not offer a solution.
>> The solution must come at the language level -- for example, make
>> TMethod managed type
>> and fully unify "procedure", "procedure of object" and "reference to procedure".
>> This will of course incur some performance cost, but since event
>> variables are in 99% of cases
>
> I sincerely hope you are kidding here. Do not slow existing constructs.
... for example, by suddenly converting all string handling to Unicode... :-))

I realize that there are downsides, and quite possibly they outweigh upsides --
although this is not quite certain to me.
Nevertheless, my point was that some solutions exist, and they are
worth investigating.

--
Alexander S. Klenin



More information about the fpc-devel mailing list