[Lazarus] Extending TRect breaks Lazarus
Marco van de Voort
marcov at stack.nl
Fri Nov 6 17:59:09 CET 2015
On Fri, Nov 06, 2015 at 05:42:39PM +0100, Michael Van Canneyt wrote:
> > by Delphi compatibility...
> Ehm. How can "with" ever be safe ?
Btw the case that I fixed was like this
procedure setwidthheight(const r : TRect); inline;
with R do
In such case fixing with SELF doesn't work, because self isn't allowed in
the nested function. I had to strip the WITH.
Luckily it wasn't as bad as expected, and only this one in the win32 widget
> Don't get me wrong:
> I use it abundantly. If I have QMYQueryObjectWithAVeryLongName then being able to write
Me too, but I like to qualify fieldnames with self when the they are short,
> 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...
> Lazarus mailing list
> Lazarus at lists.lazarus.freepascal.org
More information about the Lazarus