[fpc-pascal] for..in loops?

Dean Zobec dezobec at tin.it
Sun Nov 20 15:09:09 CET 2005


Marco van de Voort wrote:

>>Lukas Gebauer wrote:
>>    
>>
>
>  
>
>>>Look to next Pascal language enhancements 
>>>in Delphi-2006... (like operator overloads or class variables...)
>>>we already have them in free pascal for a couple of years iirc and I've
>>>never used them.
>>>      
>>>
>
>That's because they are quite limited if you have dynamic, non garbage collected
>objects.
>
>For .NET that is no problem, since the objects are GCed, and for C++ they are static.
>
>But for native Delphi, there is no good solution to do OO without a thick
>helper layer.
>
>  
>
I remember I've successfully used them with refcounted interfaces in a demo
see 
http://www.freepascal.org/cgi-bin/viewcvs.cgi/trunk/fcl/fpcunit/exampletests/money.pp

but still doing
a + b or a.add(b) it's not that different and maybe the second is clearer;

Ciao, Dean




More information about the fpc-pascal mailing list