[fpc-devel] Re: CodeGear abandons Delphi.NET

Alexander Klenin klenin at gmail.com
Thu Nov 6 16:08:56 CET 2008

On Thu, Nov 6, 2008 at 23:48, Graeme Geldenhuys <graemeg.lists at gmail.com> wrote:

> And a perfect example of why I DON'T user the 'with' statement!  Hard
> to read, hard to understand and hard to debug (tooltip expressions
> cannot evaluate it even in Delphi v7 at least).  :)

Proposed change can potentially fix all the issues, including debuggability
(since the object will be named, and thus accessible to debugger).

> The only time you will ever see me use the WITH statement
> is in auto generate UI code as shown below:
>  cbType := TfpgComboBox.Create(self);
>  with cbType do
>  begin
>    Name := 'cbType';
>    SetPosition(8, 24, 272, 22);
>    FontDesc := '#List';
>  end;

So when you write such code by hand, you do not use 'with' ?
Anyway, this is all just my opinion, and not too strong at that ;-)

Alexander S. Klenin
Insight Experts Ltd.

More information about the fpc-devel mailing list