[fpc-devel] for-in-index loop

Michael Van Canneyt michael at freepascal.org
Sat Jan 26 13:30:36 CET 2013



On Sat, 26 Jan 2013, Sven Barth wrote:

> 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

100% agreed.

The way may be hobbly, but at least we go forward...

Michael.



More information about the fpc-devel mailing list