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.

_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to