2009/10/20 Alexander Klenin <kle...@gmail.com>:
>
> for-in is just a syntax sugar plus standard interface for the cost common 
> usage
> of iterators. So they are not mutually exclusive at all.

Another flaw in the for-in concept...

  What will this do:

  for y in MyList do
  begin
    if y = XXX then
      MyList.Add(YYY);
    if y = ZZZ then
      MyList.Insert(1, AAA);
  end;

With my iterator implementation I can handle this with no problems,
and ever make the resulting behaviour user-selectable with parameters
to the MyList.GetIterator method.


-- 
Regards,
  - Graeme -


_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to