[Lazarus] 'with' is evil, isn't it?
Michael Schnell
mschnell at lumino.de
Wed Aug 3 09:31:35 CEST 2011
On 08/02/2011 06:39 PM, Jürgen Hestermann wrote:
>
>
> In general I find the "with" statement very useful and have used and
> do use it a lot.
If you are clever enough to avoid confusion ;) . (Such as a nested with
that defines the same identifier for both "with"ed record and maybe same
is also defined as the "implicitly with"ed "self" (instance record).
> And it also saves the program from calculating array indices and
> other references in these expressions multiple times so it speeds up
> the code too.
A decent compiler should be able to perform this optimization on it's
own account.
-Michael
More information about the Lazarus
mailing list