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

Paul Ishenin ip at kmiac.ru
Wed Oct 21 03:41:04 CEST 2009


Sergei Gorelkin wrote:

> The question is, what advantage all this specific syntax could give over 
> simple searching the methods by name?

Some people need less compiler magic, some does not care. New directive 
can reduce the magic level :)

Btw, we use similar compiler magic every day. Just think of:

1. functions which all have special 'Result' variable :)
2. message methods which calls 'TObject.DefaultHandler' when you call 
inherited inside.
3. tobject methods related to interfaces

I suspect there are more examples.

In all the listed examples compiler searches for the special identifier. 
Therefore GetEnumerator identifier looks as very native solution for pascal.

Best regards,
Paul Ishenin.




More information about the fpc-devel mailing list