[fpc-devel] New feature discussion: for-in loop

Marco van de Voort marcov at stack.nl
Tue Oct 20 11:38:52 CEST 2009


In our previous episode, Paul Ishenin said:
> Yes, I see this very bad too. That's why this discussion is started. But 
> what can be suggested instead?

Does there need something to be suggested per se? 

What do you think of the DECAL solution ? It's ackward, but that is because
it is pre-generics, and I think generics would solve many of the problems.
 
> I don't like non-constructive criticism. If you don't like something 
> please be ready to suggest something instead. And in this case something 
> what can be used to implement for-in loop for classes and implements 
> this delphi compatible (so 'for S in MyStringList do' will work).

I don't like for-in, but if sb wants to waste time on it, better do it
Delphi compat. I don't see the need for anything else, and if people see it,
it would be nice to hear what they think of the decal principle (but then
fixed with generics)

The Prism solution might be overly costly since it depends on a continuation
concept.



More information about the fpc-devel mailing list