[Lazarus] Extending TRect breaks Lazarus

Michael Van Canneyt michael at freepascal.org
Fri Nov 6 18:19:14 CET 2015



On Fri, 6 Nov 2015, Martin Schreiber wrote:

> On Friday 06 November 2015 17:42:39 Michael Van Canneyt wrote:
>> On Fri, 6 Nov 2015, Martin Schreiber wrote:
>>> On Friday 06 November 2015 17:20:24 Ondrej Pokorny wrote:
>>>> Nevertheless I am of the opinion that WITH is evil and should be removed
>>>> from the IDE/LCL code (unless only identifiers from within the with
>>>> scope are used; but even then they could be removed...).
>>>
>>> Or implement a safe "with" in Free Pascal without waiting until it is
>>> enforced by Delphi compatibility...
>>
>> Ehm. How can "with" ever be safe ?
>>
> You are joking, no? It has been discussed on fpc-pascal/fpc-devel several
> times.

Erm... I am not joking.

Do you really think I recall every discussion or braindead proposal from 
these mailing lists over the last 20 years ?

I appreciate your high esteem of my memory, but alas, age takes it's toll... ;-)

But presumably you mean some construct as

With QMyVeryLongQueyObjectName as Q do
   try
     // Do things with Q
   finally
     Q.Close;
   end;

?

That is a modification of the current "with". 
I assumed you meant to make an unchanged "with" safe.

That said, a construct such as "With QMyVeryLongQueyObjectName as Q do" has my support...

Michael.




More information about the Lazarus mailing list