Michael Van Canneyt wrote:

At least one of the reasons we never did implement for-in is the absolutely
horrible and totally wrong idea to use classes/interfaces for this, to which
I seriously objected.

Reading this I conclude you are against 'for-in' implementation in fpc.

I can understand
  for y in enumerated do
or
  For y in set do
or
  For Y in range do
Because this seems a natural extension of loops to enumerates (and even
then) But not ever the class-based one.

So you are not against it but you want to allow them only for the base types?

I hope you understand that ppl will use them for classes anyway?

var
  P: Pointer;
begin
  for P in GetComponents(Component) do
    TComponent(P).DoSomething;
end;

And what is so special in the class type?

Best regards,
Paul Ishenin.

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

Reply via email to