[fpc-devel] for-in-index loop

Sven Barth pascaldragon at googlemail.com
Sat Jan 26 13:25:12 CET 2013


On 26.01.2013 12:34, Michael Van Canneyt wrote:
>> I think now when operators for simple types are present in the
>> language it is too late to care about explicitly declarative language.
>> It is simple not explicit anymore.
>>
>> And index (or better to call it key) extension for for-in loop will
>> not make it less explicit for sure.
>
> Personally, I think the tuple approach proposal is more general, and
> therefor better.
>
> Once more, I do not think that language extensions are bad. I judge them
> on a case by case basis.
>
> But if I must choose between
>
> for a,b in c do
>
> (with C a tuple enumerator/iterator) or
>
> for a in c index b do
>
> Then the former is ten times (well, a lot) better.
>
> So if someone were to introduce that to solve the original poster's
> problem, you will not hear me protesting, it will have been well worth
> the energy I put in this discussion.

Then let's better concentrate our energy to implementing tuples in a 
good way and (more or less) everyone will be happy :D

I'd suggest to start a new thread for that if we want to discuss 
proposals for syntax, semantics, corner cases, etc.

Regards,
Sven



More information about the fpc-devel mailing list