[Lazarus] Fixes 2.6.2 cod breaks 2.6.0 code?

Graeme Geldenhuys graeme at geldenhuys.co.uk
Thu Mar 14 15:57:45 CET 2013


On 2013-03-14 14:42, Frank Church wrote:
> domain better. For instance if you are iterating over an array where
> elements are referenced by an integers, +1, +2 etc give the impression
> your program involves number arithmetic, where as Next and Prev, or

And why I created and use an Iterator unit, which defines a standard
"iterator interface" for many data types. A factory method will return
the correct iterator interface to me. That way my code looks consistent
no matter what data I iterate. I also have more control (HasNext,
HasPrev, Next, Prev, Reset, Skip etc), and I can even iterate certain
data using regex, so only regex matches are returned.

Still doesn't change my mind about Inc(), Dec(), Pred(), Succ() etc. As
I said, my personal opinion, and I think they make reading code harder.
Your mileage my vary.


Regards,
  - Graeme -

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/





More information about the Lazarus mailing list