[Lazarus] Extending TRect breaks Lazarus

Michael Van Canneyt michael at freepascal.org
Fri Nov 6 17:42:39 CET 2015

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 ?

Don't get me wrong:

I use it abundantly. If I have QMYQueryObjectWithAVeryLongName then being able to write

With QMYQueryObjectWithAVeryLongName do
     // Really nice code

is really good (tm).

NOT being able to use with would seriously impede on the readability of my code.

Add this to the observation that the lazarus team demands 'clear' variable names,
and does not like/accept i,m,f,p,q or whatever as variable names, and using "with" 
becomes very attractive indeed...


More information about the Lazarus mailing list