On 14 March 2013 14:08, Graeme Geldenhuys <[email protected]> wrote: > On 2013-03-14 11:11, Lukasz Sokol wrote: >>> GCache.ClientHeight := GCache.ClientHeight - (DefaultRowHeight * >>> FooterRowCount + 2); >> >> ... which is sort of more readable than Dec() construct Frank was using, >> (but it is IMO&TMV only) ... > > [personal opinion] > I agree fully. I don't really like Dec(), Prev() etc methods. >
Functions like Dec, Succ, Inc have a role because they may reflect the 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 even Another means your function is iterating over an as yet unprocessed element of your set. The fact that the element accessing constructs map onto numbers is wholly incidental. -- Frank Church ======================= http://devblog.brahmancreations.com -- _______________________________________________ Lazarus mailing list [email protected] http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
