Op Thu, 17 Jul 2008, schreef Graeme Geldenhuys:

On Thu, Jul 17, 2008 at 9:09 AM, Jonas Maebe <[EMAIL PROTECTED]> wrote:
Or

with FDayList[itm.WeekDayNum].Rows[itm.Timeslot] do
 AvailableSlots:= AvailableSlots+itm.CountSlots;


No that's one language construct I wish Object Pascal could do
without!  I personally hate the 'with' statement, and it's hard to
debug.

It is simply a tradeoff between readability and understandability. A line a:=a+1 is much more clean than a few lines of pointer dereferences, array indexes and records subscripts. The downside is that it becomes harder to track where the variables come from. Huge "with" bodies can be confusing. The programmer decides, after all writing readable code is an art.

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

Reply via email to