[fpc-pascal] for .. in loop implementation

Jeremy Cowgar jeremy at cowgar.com
Thu Jan 8 16:20:42 CET 2009


Marco van de Voort wrote:
> In our previous episode, leledumbo said:
>
>   
>> The latter one has iteration overheads, while the former can be optimized to
>> loop as many as needed. I'm not saying I'm the best Pascal programmer, but
>> in case there's a (better) solution to this (rather than extending the
>> language) please tell me.
>>     
>
> Your assesment is correct as far as I can see. 
>
> However IMHO that doesn't meant you are right. One single case of an
> optimalization advantage, and then in a border case like iteration over a
> constant set does not justify a language extension.
>   

What is the negative of adding it? To me, I program in a language 
because it makes my life easy, not because each keyword has a 
certain/clear purpose and cannot be done any other method. The easier FP 
is for me to program in (or the less typing I have to do), the better FP 
is to me. I'm confused on why not to add it.

Jeremy




More information about the fpc-pascal mailing list